diff --git a/clients/container_analysis/README.md b/clients/container_analysis/README.md index 5a92869401..0db53e27ff 100644 --- a/clients/container_analysis/README.md +++ b/clients/container_analysis/README.md @@ -2,7 +2,7 @@ Container Analysis API client library. -An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts. +This API is a prerequisite for leveraging Artifact Analysis scanning capabilities in both Artifact Registry and with Advanced Vulnerability Insights (runtime scanning) in GKE. In addition, the Container Analysis API is an implementation of the Grafeas API, which enables storing, querying, and retrieval of critical metadata about all of your software artifacts. ## Installation diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/api/projects.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/api/projects.ex index 2c28aed551..51651384cd 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/api/projects.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/api/projects.ex @@ -25,6 +25,665 @@ defmodule GoogleApi.ContainerAnalysis.V1.Api.Projects do @library_version Mix.Project.config() |> Keyword.get(:version, "") + @doc """ + Gets the specified note. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `notes_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1.Model.Note{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_notes_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1.Model.Note.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_notes_get( + connection, + projects_id, + locations_id, + notes_id, + 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(:get) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "notesId" => URI.encode(notes_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.ContainerAnalysis.V1.Model.Note{}]) + end + + @doc """ + Lists notes for the specified project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `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"). + * `:filter` (*type:* `String.t`) - The filter expression. + * `:pageSize` (*type:* `integer()`) - Number of notes to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. + * `:pageToken` (*type:* `String.t`) - Token to provide to skip to a particular spot in the list. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1.Model.ListNotesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_notes_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1.Model.ListNotesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_notes_list( + connection, + projects_id, + locations_id, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/notes", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &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.ContainerAnalysis.V1.Model.ListNotesResponse{}] + ) + end + + @doc """ + Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the note to list occurrences for in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `notes_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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"). + * `:filter` (*type:* `String.t`) - The filter expression. + * `:pageSize` (*type:* `integer()`) - Number of occurrences to return in the list. + * `:pageToken` (*type:* `String.t`) - Token to provide to skip to a particular spot in the list. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1.Model.ListNoteOccurrencesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_notes_occurrences_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1.Model.ListNoteOccurrencesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_notes_occurrences_list( + connection, + projects_id, + locations_id, + notes_id, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}/occurrences", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "notesId" => URI.encode(notes_id, &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.ContainerAnalysis.V1.Model.ListNoteOccurrencesResponse{}] + ) + end + + @doc """ + Gets the specified occurrence. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `occurrences_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1.Model.Occurrence{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_occurrences_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1.Model.Occurrence.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_occurrences_get( + connection, + projects_id, + locations_id, + occurrences_id, + 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(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "occurrencesId" => URI.encode(occurrences_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.ContainerAnalysis.V1.Model.Occurrence{}]) + end + + @doc """ + Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `occurrences_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1.Model.Note{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_occurrences_get_notes( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1.Model.Note.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_occurrences_get_notes( + connection, + projects_id, + locations_id, + occurrences_id, + 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(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}/notes", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "occurrencesId" => URI.encode(occurrences_id, &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.ContainerAnalysis.V1.Model.Note{}]) + end + + @doc """ + Gets a summary of the number and severity of occurrences. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the project to get a vulnerability summary for in the form of `projects/[PROJECT_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `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"). + * `:filter` (*type:* `String.t`) - The filter expression. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityOccurrencesSummary{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_occurrences_get_vulnerability_summary( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityOccurrencesSummary.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_occurrences_get_vulnerability_summary( + connection, + projects_id, + locations_id, + 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, + :filter => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/occurrences:vulnerabilitySummary", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &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.ContainerAnalysis.V1.Model.VulnerabilityOccurrencesSummary{}] + ) + end + + @doc """ + Lists occurrences for the specified project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the project to list occurrences for in the form of `projects/[PROJECT_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `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"). + * `:filter` (*type:* `String.t`) - The filter expression. + * `:pageSize` (*type:* `integer()`) - Number of occurrences to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. + * `:pageToken` (*type:* `String.t`) - Token to provide to skip to a particular spot in the list. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1.Model.ListOccurrencesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_occurrences_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1.Model.ListOccurrencesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_occurrences_list( + connection, + projects_id, + locations_id, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/occurrences", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &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.ContainerAnalysis.V1.Model.ListOccurrencesResponse{}] + ) + end + + @doc """ + Generates an SBOM for the given resource. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the resource in the form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `resources_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1.Model.ExportSBOMRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1.Model.ExportSBOMResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_resources_export_sbom( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1.Model.ExportSBOMResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_resources_export_sbom( + connection, + projects_id, + locations_id, + resources_id, + 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(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/resources/{resourcesId}:exportSBOM", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "resourcesId" => URI.encode(resources_id, &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.ContainerAnalysis.V1.Model.ExportSBOMResponse{}] + ) + end + @doc """ Creates new notes in batch. @@ -1619,4 +2278,82 @@ defmodule GoogleApi.ContainerAnalysis.V1.Api.Projects do opts ++ [struct: %GoogleApi.ContainerAnalysis.V1.Model.TestIamPermissionsResponse{}] ) end + + @doc """ + Generates an SBOM for the given resource. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the resource in the form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. + * `resources_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1.Model.ExportSBOMRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1.Model.ExportSBOMResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_resources_export_sbom( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1.Model.ExportSBOMResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_resources_export_sbom( + connection, + projects_id, + resources_id, + 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(:post) + |> Request.url("/v1/projects/{projectsId}/resources/{resourcesId}:exportSBOM", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "resourcesId" => URI.encode(resources_id, &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.ContainerAnalysis.V1.Model.ExportSBOMResponse{}] + ) + end end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/metadata.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/metadata.ex index cc347510e8..b36b84c55f 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/metadata.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.ContainerAnalysis.V1 do API client metadata for GoogleApi.ContainerAnalysis.V1. """ - @discovery_revision "20221112" + @discovery_revision "20240301" def discovery_revision(), do: @discovery_revision end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/assessment.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/assessment.ex new file mode 100644 index 0000000000..c8612c61c1 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/assessment.ex @@ -0,0 +1,70 @@ +# 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.ContainerAnalysis.V1.Model.Assessment do + @moduledoc """ + Assessment provides all information that is related to a single vulnerability for this product. + + ## Attributes + + * `cve` (*type:* `String.t`, *default:* `nil`) - Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. Deprecated: Use vulnerability_id instead to denote CVEs. + * `impacts` (*type:* `list(String.t)`, *default:* `nil`) - Contains information about the impact of this vulnerability, this will change with time. + * `justification` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.Justification.t`, *default:* `nil`) - Justification provides the justification when the state of the assessment if NOT_AFFECTED. + * `longDescription` (*type:* `String.t`, *default:* `nil`) - A detailed description of this Vex. + * `relatedUris` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl.t)`, *default:* `nil`) - Holds a list of references associated with this vulnerability item and assessment. These uris have additional information about the vulnerability and the assessment itself. E.g. Link to a document which details how this assessment concluded the state of this vulnerability. + * `remediations` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.Remediation.t)`, *default:* `nil`) - Specifies details on how to handle (and presumably, fix) a vulnerability. + * `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this Vex. + * `state` (*type:* `String.t`, *default:* `nil`) - Provides the state of this Vulnerability assessment. + * `vulnerabilityId` (*type:* `String.t`, *default:* `nil`) - The vulnerability identifier for this Assessment. Will hold one of common identifiers e.g. CVE, GHSA etc. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cve => String.t() | nil, + :impacts => list(String.t()) | nil, + :justification => GoogleApi.ContainerAnalysis.V1.Model.Justification.t() | nil, + :longDescription => String.t() | nil, + :relatedUris => list(GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl.t()) | nil, + :remediations => list(GoogleApi.ContainerAnalysis.V1.Model.Remediation.t()) | nil, + :shortDescription => String.t() | nil, + :state => String.t() | nil, + :vulnerabilityId => String.t() | nil + } + + field(:cve) + field(:impacts, type: :list) + field(:justification, as: GoogleApi.ContainerAnalysis.V1.Model.Justification) + field(:longDescription) + field(:relatedUris, as: GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl, type: :list) + field(:remediations, as: GoogleApi.ContainerAnalysis.V1.Model.Remediation, type: :list) + field(:shortDescription) + field(:state) + field(:vulnerabilityId) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.Assessment do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.Assessment.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.Assessment do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/binding.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/binding.ex index 993d89a12d..4badb700fe 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/binding.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/binding.ex @@ -22,8 +22,8 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.Expr.t`, *default:* `nil`) - The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. - * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). """ use GoogleApi.Gax.ModelBase diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_definition.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_definition.ex new file mode 100644 index 0000000000..2240412c1e --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_definition.ex @@ -0,0 +1,60 @@ +# 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.ContainerAnalysis.V1.Model.BuildDefinition do + @moduledoc """ + + + ## Attributes + + * `buildType` (*type:* `String.t`, *default:* `nil`) - + * `externalParameters` (*type:* `map()`, *default:* `nil`) - + * `internalParameters` (*type:* `map()`, *default:* `nil`) - + * `resolvedDependencies` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor.t)`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :buildType => String.t() | nil, + :externalParameters => map() | nil, + :internalParameters => map() | nil, + :resolvedDependencies => + list(GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor.t()) | nil + } + + field(:buildType) + field(:externalParameters, type: :map) + field(:internalParameters, type: :map) + + field(:resolvedDependencies, + as: GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.BuildDefinition do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.BuildDefinition.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.BuildDefinition do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_metadata.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_metadata.ex new file mode 100644 index 0000000000..09fbf0db08 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_metadata.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1.Model.BuildMetadata do + @moduledoc """ + + + ## Attributes + + * `finishedOn` (*type:* `DateTime.t`, *default:* `nil`) - + * `invocationId` (*type:* `String.t`, *default:* `nil`) - + * `startedOn` (*type:* `DateTime.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :finishedOn => DateTime.t() | nil, + :invocationId => String.t() | nil, + :startedOn => DateTime.t() | nil + } + + field(:finishedOn, as: DateTime) + field(:invocationId) + field(:startedOn, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.BuildMetadata do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.BuildMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.BuildMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_occurrence.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_occurrence.ex index 4c500d26bd..8af7be477f 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_occurrence.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_occurrence.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.BuildOccurrence do ## Attributes + * `inTotoSlsaProvenanceV1` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.InTotoSlsaProvenanceV1.t`, *default:* `nil`) - In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa spec, wrapped in an in-toto statement. This allows for direct jsonification of a to-spec in-toto slsa statement with a to-spec slsa provenance. * `intotoProvenance` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.InTotoProvenance.t`, *default:* `nil`) - Deprecated. See InTotoStatement for the replacement. In-toto Provenance representation as defined in spec. * `intotoStatement` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.InTotoStatement.t`, *default:* `nil`) - In-toto Statement representation as defined in spec. The intoto_statement can contain any type of provenance. The serialized payload of the statement can be stored and signed in the Occurrence's envelope. * `provenance` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.BuildProvenance.t`, *default:* `nil`) - The actual provenance for the build. @@ -30,12 +31,15 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.BuildOccurrence do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :inTotoSlsaProvenanceV1 => + GoogleApi.ContainerAnalysis.V1.Model.InTotoSlsaProvenanceV1.t() | nil, :intotoProvenance => GoogleApi.ContainerAnalysis.V1.Model.InTotoProvenance.t() | nil, :intotoStatement => GoogleApi.ContainerAnalysis.V1.Model.InTotoStatement.t() | nil, :provenance => GoogleApi.ContainerAnalysis.V1.Model.BuildProvenance.t() | nil, :provenanceBytes => String.t() | nil } + field(:inTotoSlsaProvenanceV1, as: GoogleApi.ContainerAnalysis.V1.Model.InTotoSlsaProvenanceV1) field(:intotoProvenance, as: GoogleApi.ContainerAnalysis.V1.Model.InTotoProvenance) field(:intotoStatement, as: GoogleApi.ContainerAnalysis.V1.Model.InTotoStatement) field(:provenance, as: GoogleApi.ContainerAnalysis.V1.Model.BuildProvenance) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_step.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_step.ex index e0205df9f8..fa68b06892 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_step.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/build_step.ex @@ -17,13 +17,14 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.BuildStep do @moduledoc """ - A step in the build pipeline. Next ID: 20 + A step in the build pipeline. Next ID: 21 ## Attributes * `allowExitCodes` (*type:* `list(integer())`, *default:* `nil`) - Allow this build step to fail without failing the entire build if and only if the exit code is one of the specified codes. If allow_failure is also specified, this field will take precedence. * `allowFailure` (*type:* `boolean()`, *default:* `nil`) - Allow this build step to fail without failing the entire build. If false, the entire build will fail if this step fails. Otherwise, the build will succeed, but this step will still have a failure status. Error information will be reported in the failure_detail field. * `args` (*type:* `list(String.t)`, *default:* `nil`) - A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. + * `automapSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to include built-in and custom substitutions as env variables for this build step. This option will override the global option in BuildOption. * `dir` (*type:* `String.t`, *default:* `nil`) - Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. * `entrypoint` (*type:* `String.t`, *default:* `nil`) - Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used. * `env` (*type:* `list(String.t)`, *default:* `nil`) - A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". @@ -46,6 +47,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.BuildStep do :allowExitCodes => list(integer()) | nil, :allowFailure => boolean() | nil, :args => list(String.t()) | nil, + :automapSubstitutions => boolean() | nil, :dir => String.t() | nil, :entrypoint => String.t() | nil, :env => list(String.t()) | nil, @@ -65,6 +67,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.BuildStep do field(:allowExitCodes, type: :list) field(:allowFailure) field(:args, type: :list) + field(:automapSubstitutions) field(:dir) field(:entrypoint) field(:env, type: :list) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/cloud_storage_location.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/cloud_storage_location.ex new file mode 100644 index 0000000000..862d9c2a2e --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/cloud_storage_location.ex @@ -0,0 +1,41 @@ +# 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.ContainerAnalysis.V1.Model.CloudStorageLocation do + @moduledoc """ + Empty placeholder to denote that this is a Google Cloud Storage export request. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.CloudStorageLocation do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.CloudStorageLocation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.CloudStorageLocation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/compliance_note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/compliance_note.ex index 49afc54e0a..3f0bc85ced 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/compliance_note.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/compliance_note.ex @@ -23,6 +23,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ComplianceNote do * `cisBenchmark` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.CisBenchmark.t`, *default:* `nil`) - * `description` (*type:* `String.t`, *default:* `nil`) - A description about this compliance check. + * `impact` (*type:* `String.t`, *default:* `nil`) - * `rationale` (*type:* `String.t`, *default:* `nil`) - A rationale for the existence of this compliance check. * `remediation` (*type:* `String.t`, *default:* `nil`) - A description of remediation steps if the compliance check fails. * `scanInstructions` (*type:* `String.t`, *default:* `nil`) - Serialized scan instructions with a predefined format. @@ -35,6 +36,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ComplianceNote do @type t :: %__MODULE__{ :cisBenchmark => GoogleApi.ContainerAnalysis.V1.Model.CisBenchmark.t() | nil, :description => String.t() | nil, + :impact => String.t() | nil, :rationale => String.t() | nil, :remediation => String.t() | nil, :scanInstructions => String.t() | nil, @@ -44,6 +46,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ComplianceNote do field(:cisBenchmark, as: GoogleApi.ContainerAnalysis.V1.Model.CisBenchmark) field(:description) + field(:impact) field(:rationale) field(:remediation) field(:scanInstructions) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex index 972841f5c4..d693ed79fe 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex @@ -23,6 +23,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl * `images` (*type:* `list(String.t)`, *default:* `nil`) - A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE. * `mavenArtifacts` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact.t)`, *default:* `nil`) - A list of Maven artifacts to be uploaded to Artifact Registry upon successful completion of all build steps. Artifacts in the workspace matching specified paths globs will be uploaded to the specified Artifact Registry repository using the builder service account's credentials. If any artifacts fail to be pushed, the build is marked FAILURE. + * `npmPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage.t)`, *default:* `nil`) - A list of npm packages to be uploaded to Artifact Registry upon successful completion of all build steps. Npm packages in the specified paths will be uploaded to the specified Artifact Registry repository using the builder service account's credentials. If any packages fail to be pushed, the build is marked FAILURE. * `objects` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects.t`, *default:* `nil`) - A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. * `pythonPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage.t)`, *default:* `nil`) - A list of Python packages to be uploaded to Artifact Registry upon successful completion of all build steps. The build service account credentials will be used to perform the upload. If any objects fail to be pushed, the build is marked FAILURE. """ @@ -36,6 +37,11 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact.t() ) | nil, + :npmPackages => + list( + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage.t() + ) + | nil, :objects => GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects.t() | nil, @@ -54,6 +60,12 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl type: :list ) + field(:npmPackages, + as: + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage, + type: :list + ) + field(:objects, as: GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts_npm_package.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts_npm_package.ex new file mode 100644 index 0000000000..aed5986186 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts_npm_package.ex @@ -0,0 +1,56 @@ +# 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.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage do + @moduledoc """ + Npm package to upload to Artifact Registry upon successful completion of all build steps. + + ## Attributes + + * `packagePath` (*type:* `String.t`, *default:* `nil`) - Path to the package.json. e.g. workspace/path/to/package + * `repository` (*type:* `String.t`, *default:* `nil`) - Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :packagePath => String.t() | nil, + :repository => String.t() | nil + } + + field(:packagePath) + field(:repository) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex index 109fd573a1..4b73997ff5 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex @@ -31,7 +31,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl * `id` (*type:* `String.t`, *default:* `nil`) - Output only. Unique identifier of the build. * `images` (*type:* `list(String.t)`, *default:* `nil`) - A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`. * `logUrl` (*type:* `String.t`, *default:* `nil`) - Output only. URL to logs for this build in Google Cloud Console. - * `logsBucket` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + * `logsBucket` (*type:* `String.t`, *default:* `nil`) - Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The 'Build' name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service. * `options` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions.t`, *default:* `nil`) - Special options for this build. * `projectId` (*type:* `String.t`, *default:* `nil`) - Output only. ID of the project. @@ -47,7 +47,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl * `steps` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep.t)`, *default:* `nil`) - Required. The operations to be performed on the workspace. * `substitutions` (*type:* `map()`, *default:* `nil`) - Substitutions data for `Build` resource. * `tags` (*type:* `list(String.t)`, *default:* `nil`) - Tags for annotation of a `Build`. These are not docker tags. - * `timeout` (*type:* `String.t`, *default:* `nil`) - Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes. + * `timeout` (*type:* `String.t`, *default:* `nil`) - Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes. * `timing` (*type:* `%{optional(String.t) => GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t}`, *default:* `nil`) - Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps. * PUSH: time to push all artifacts including docker images and non docker artifacts. * FETCHSOURCE: time to fetch source. * SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included. * `warnings` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning.t)`, *default:* `nil`) - Output only. Non-fatal problems encountered during the execution of the build. """ diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex index 5f1f80efee..ddcae398a2 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex @@ -21,10 +21,12 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl ## Attributes + * `automapSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to include built-in and custom substitutions as env variables for all build steps. + * `defaultLogsBucketBehavior` (*type:* `String.t`, *default:* `nil`) - Optional. Option to specify how default logs buckets are setup. * `diskSizeGb` (*type:* `String.t`, *default:* `nil`) - Requested disk size for the VM that runs the build. Note that this is *NOT* "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 2000GB; builds that request more than the maximum are rejected with an error. * `dynamicSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file. * `env` (*type:* `list(String.t)`, *default:* `nil`) - A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". - * `logStreamingOption` (*type:* `String.t`, *default:* `nil`) - Option to define build log streaming behavior to Google Cloud Storage. + * `logStreamingOption` (*type:* `String.t`, *default:* `nil`) - Option to define build log streaming behavior to Cloud Storage. * `logging` (*type:* `String.t`, *default:* `nil`) - Option to specify the logging mode, which determines if and where build logs are stored. * `machineType` (*type:* `String.t`, *default:* `nil`) - Compute Engine machine type on which to run the build. * `pool` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption.t`, *default:* `nil`) - Optional. Specification for execution on a `WorkerPool`. See [running builds in a private pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) for more information. @@ -39,6 +41,8 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :automapSubstitutions => boolean() | nil, + :defaultLogsBucketBehavior => String.t() | nil, :diskSizeGb => String.t() | nil, :dynamicSubstitutions => boolean() | nil, :env => list(String.t()) | nil, @@ -60,6 +64,8 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl :workerPool => String.t() | nil } + field(:automapSubstitutions) + field(:defaultLogsBucketBehavior) field(:diskSizeGb) field(:dynamicSubstitutions) field(:env, type: :list) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex index a6658b2cb9..c1c892f84c 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl * `allowExitCodes` (*type:* `list(integer())`, *default:* `nil`) - Allow this build step to fail without failing the entire build if and only if the exit code is one of the specified codes. If allow_failure is also specified, this field will take precedence. * `allowFailure` (*type:* `boolean()`, *default:* `nil`) - Allow this build step to fail without failing the entire build. If false, the entire build will fail if this step fails. Otherwise, the build will succeed, but this step will still have a failure status. Error information will be reported in the failure_detail field. * `args` (*type:* `list(String.t)`, *default:* `nil`) - A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. + * `automapSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to include built-in and custom substitutions as env variables for this build step. This option will override the global option in BuildOption. * `dir` (*type:* `String.t`, *default:* `nil`) - Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. * `entrypoint` (*type:* `String.t`, *default:* `nil`) - Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used. * `env` (*type:* `list(String.t)`, *default:* `nil`) - A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". @@ -46,6 +47,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl :allowExitCodes => list(integer()) | nil, :allowFailure => boolean() | nil, :args => list(String.t()) | nil, + :automapSubstitutions => boolean() | nil, :dir => String.t() | nil, :entrypoint => String.t() | nil, :env => list(String.t()) | nil, @@ -73,6 +75,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl field(:allowExitCodes, type: :list) field(:allowFailure) field(:args, type: :list) + field(:automapSubstitutions) field(:dir) field(:entrypoint) field(:env, type: :list) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_connected_repository.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_connected_repository.ex new file mode 100644 index 0000000000..dc39dc114e --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_connected_repository.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.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository do + @moduledoc """ + Location of the source in a 2nd-gen Google Cloud Build repository resource. + + ## Attributes + + * `dir` (*type:* `String.t`, *default:* `nil`) - Directory, relative to the source root, in which to run the build. + * `repository` (*type:* `String.t`, *default:* `nil`) - Required. Name of the Google Cloud Build repository, formatted as `projects/*/locations/*/connections/*/repositories/*`. + * `revision` (*type:* `String.t`, *default:* `nil`) - The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dir => String.t() | nil, + :repository => String.t() | nil, + :revision => String.t() | nil + } + + field(:dir) + field(:repository) + field(:revision) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_git_source.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_git_source.ex new file mode 100644 index 0000000000..0b30e69114 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_git_source.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.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource do + @moduledoc """ + Location of the source in any accessible Git repository. + + ## Attributes + + * `dir` (*type:* `String.t`, *default:* `nil`) - Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. + * `revision` (*type:* `String.t`, *default:* `nil`) - The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses `git fetch` to fetch the revision from the Git repository; therefore make sure that the string you provide for `revision` is parsable by the command. For information on string values accepted by `git fetch`, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on `git fetch`, see https://git-scm.com/docs/git-fetch. + * `url` (*type:* `String.t`, *default:* `nil`) - Location of the Git repo to build. This will be used as a `git remote`, see https://git-scm.com/docs/git-remote. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dir => String.t() | nil, + :revision => String.t() | nil, + :url => String.t() | nil + } + + field(:dir) + field(:revision) + field(:url) +end + +defimpl Poison.Decoder, + for: GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex index 75d9eedfb7..8662a15aa8 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex @@ -24,9 +24,10 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl * `artifactManifest` (*type:* `String.t`, *default:* `nil`) - Path to the artifact manifest for non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage. * `artifactTiming` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t`, *default:* `nil`) - Time to push all non-container artifacts to Cloud Storage. * `buildStepImages` (*type:* `list(String.t)`, *default:* `nil`) - List of build step digests, in the order corresponding to build step indices. - * `buildStepOutputs` (*type:* `list(String.t)`, *default:* `nil`) - List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored. + * `buildStepOutputs` (*type:* `list(String.t)`, *default:* `nil`) - List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data is stored. * `images` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage.t)`, *default:* `nil`) - Container images that were built as a part of the build. * `mavenArtifacts` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact.t)`, *default:* `nil`) - Maven artifacts uploaded to Artifact Registry at the end of the build. + * `npmPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage.t)`, *default:* `nil`) - Npm packages uploaded to Artifact Registry at the end of the build. * `numArtifacts` (*type:* `String.t`, *default:* `nil`) - Number of non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage. * `pythonPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage.t)`, *default:* `nil`) - Python artifacts uploaded to Artifact Registry at the end of the build. """ @@ -50,6 +51,11 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact.t() ) | nil, + :npmPackages => + list( + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage.t() + ) + | nil, :numArtifacts => String.t() | nil, :pythonPackages => list( @@ -79,6 +85,12 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl type: :list ) + field(:npmPackages, + as: + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage, + type: :list + ) + field(:numArtifacts) field(:pythonPackages, diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex index e2b4d028dc..cf1e28fdce 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex @@ -21,14 +21,22 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl ## Attributes + * `connectedRepository` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t`, *default:* `nil`) - Optional. If provided, get the source from this 2nd-gen Google Cloud Build repository resource. + * `gitSource` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t`, *default:* `nil`) - If provided, get the source from this Git repository. * `repoSource` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t`, *default:* `nil`) - If provided, get the source from this location in a Cloud Source Repository. - * `storageSource` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource.t`, *default:* `nil`) - If provided, get the source from this location in Google Cloud Storage. - * `storageSourceManifest` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest.t`, *default:* `nil`) - If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). + * `storageSource` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource.t`, *default:* `nil`) - If provided, get the source from this location in Cloud Storage. + * `storageSourceManifest` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest.t`, *default:* `nil`) - If provided, get the source from this manifest in Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :connectedRepository => + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t() + | nil, + :gitSource => + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t() + | nil, :repoSource => GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t() | nil, @@ -40,6 +48,15 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl | nil } + field(:connectedRepository, + as: + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository + ) + + field(:gitSource, + as: GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource + ) + field(:repoSource, as: GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource ) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex index caf1d8c540..5ea7ccef88 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex @@ -22,6 +22,8 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl ## Attributes * `fileHashes` (*type:* `%{optional(String.t) => GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t}`, *default:* `nil`) - Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file. + * `resolvedConnectedRepository` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t`, *default:* `nil`) - Output only. A copy of the build's `source.connected_repository`, if exists, with any revisions resolved. + * `resolvedGitSource` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t`, *default:* `nil`) - Output only. A copy of the build's `source.git_source`, if exists, with any revisions resolved. * `resolvedRepoSource` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t`, *default:* `nil`) - A copy of the build's `source.repo_source`, if exists, with any revisions resolved. * `resolvedStorageSource` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource.t`, *default:* `nil`) - A copy of the build's `source.storage_source`, if exists, with any generations resolved. * `resolvedStorageSourceManifest` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest.t`, *default:* `nil`) - A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview. @@ -36,6 +38,12 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t() } | nil, + :resolvedConnectedRepository => + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t() + | nil, + :resolvedGitSource => + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t() + | nil, :resolvedRepoSource => GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t() | nil, @@ -53,6 +61,15 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl type: :map ) + field(:resolvedConnectedRepository, + as: + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository + ) + + field(:resolvedGitSource, + as: GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource + ) + field(:resolvedRepoSource, as: GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource ) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex index b846f46eb2..3ba514e408 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex @@ -17,13 +17,14 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource do @moduledoc """ - Location of the source in an archive file in Google Cloud Storage. + Location of the source in an archive file in Cloud Storage. ## Attributes - * `bucket` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * `generation` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. - * `object` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage object containing the source. This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to build. + * `bucket` (*type:* `String.t`, *default:* `nil`) - Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * `generation` (*type:* `String.t`, *default:* `nil`) - Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + * `object` (*type:* `String.t`, *default:* `nil`) - Cloud Storage object containing the source. This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to build. + * `sourceFetcher` (*type:* `String.t`, *default:* `nil`) - Optional. Option to specify the tool to fetch the source file for the build. """ use GoogleApi.Gax.ModelBase @@ -31,12 +32,14 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCl @type t :: %__MODULE__{ :bucket => String.t() | nil, :generation => String.t() | nil, - :object => String.t() | nil + :object => String.t() | nil, + :sourceFetcher => String.t() | nil } field(:bucket) field(:generation) field(:object) + field(:sourceFetcher) end defimpl Poison.Decoder, diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex index d541cfc695..a435e9b421 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex @@ -17,13 +17,13 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest do @moduledoc """ - Location of the source manifest in Google Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). + Location of the source manifest in Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). ## Attributes - * `bucket` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * `generation` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. - * `object` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage object containing the source manifest. This object must be a JSON file. + * `bucket` (*type:* `String.t`, *default:* `nil`) - Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * `generation` (*type:* `String.t`, *default:* `nil`) - Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + * `object` (*type:* `String.t`, *default:* `nil`) - Cloud Storage object containing the source manifest. This object must be a JSON file. """ use GoogleApi.Gax.ModelBase diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_uploaded_npm_package.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_uploaded_npm_package.ex new file mode 100644 index 0000000000..3bb462ceff --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/containeranalysis_google_devtools_cloudbuild_v1_uploaded_npm_package.ex @@ -0,0 +1,69 @@ +# 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.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage do + @moduledoc """ + An npm package uploaded to Artifact Registry using the NpmPackage directive. + + ## Attributes + + * `fileHashes` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t`, *default:* `nil`) - Hash types and values of the npm package. + * `pushTiming` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t`, *default:* `nil`) - Output only. Stores timing information for pushing the specified artifact. + * `uri` (*type:* `String.t`, *default:* `nil`) - URI of the uploaded npm package. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fileHashes => + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t() + | nil, + :pushTiming => + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t() + | nil, + :uri => String.t() | nil + } + + field(:fileHashes, + as: GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes + ) + + field(:pushTiming, + as: GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan + ) + + field(:uri) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/discovery_occurrence.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/discovery_occurrence.ex index 6f107d4680..eae865d992 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/discovery_occurrence.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/discovery_occurrence.ex @@ -29,6 +29,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.DiscoveryOccurrence do * `continuousAnalysis` (*type:* `String.t`, *default:* `nil`) - Whether the resource is continuously analyzed. * `cpe` (*type:* `String.t`, *default:* `nil`) - The CPE of the resource being scanned. * `lastScanTime` (*type:* `DateTime.t`, *default:* `nil`) - The last time this resource was scanned. + * `sbomStatus` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.SBOMStatus.t`, *default:* `nil`) - The status of an SBOM generation. """ use GoogleApi.Gax.ModelBase @@ -41,7 +42,8 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.DiscoveryOccurrence do :archiveTime => DateTime.t() | nil, :continuousAnalysis => String.t() | nil, :cpe => String.t() | nil, - :lastScanTime => DateTime.t() | nil + :lastScanTime => DateTime.t() | nil, + :sbomStatus => GoogleApi.ContainerAnalysis.V1.Model.SBOMStatus.t() | nil } field(:analysisCompleted, as: GoogleApi.ContainerAnalysis.V1.Model.AnalysisCompleted) @@ -52,6 +54,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.DiscoveryOccurrence do field(:continuousAnalysis) field(:cpe) field(:lastScanTime, as: DateTime) + field(:sbomStatus, as: GoogleApi.ContainerAnalysis.V1.Model.SBOMStatus) end defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.DiscoveryOccurrence do diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/export_sbom_request.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/export_sbom_request.ex new file mode 100644 index 0000000000..185f90714d --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/export_sbom_request.ex @@ -0,0 +1,47 @@ +# 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.ContainerAnalysis.V1.Model.ExportSBOMRequest do + @moduledoc """ + The request to generate and export SBOM. Target must be specified for the request. + + ## Attributes + + * `cloudStorageLocation` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.CloudStorageLocation.t`, *default:* `nil`) - Empty placeholder to denote that this is a Google Cloud Storage export request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cloudStorageLocation => + GoogleApi.ContainerAnalysis.V1.Model.CloudStorageLocation.t() | nil + } + + field(:cloudStorageLocation, as: GoogleApi.ContainerAnalysis.V1.Model.CloudStorageLocation) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.ExportSBOMRequest do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.ExportSBOMRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.ExportSBOMRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/export_sbom_response.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/export_sbom_response.ex new file mode 100644 index 0000000000..e5b9f69705 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/export_sbom_response.ex @@ -0,0 +1,46 @@ +# 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.ContainerAnalysis.V1.Model.ExportSBOMResponse do + @moduledoc """ + The response from a call to ExportSBOM. + + ## Attributes + + * `discoveryOccurrence` (*type:* `String.t`, *default:* `nil`) - The name of the discovery occurrence in the form "projects/{project_id}/occurrences/{OCCURRENCE_ID} It can be used to track the progress of the SBOM export. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :discoveryOccurrence => String.t() | nil + } + + field(:discoveryOccurrence) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.ExportSBOMResponse do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.ExportSBOMResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.ExportSBOMResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/in_toto_slsa_provenance_v1.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/in_toto_slsa_provenance_v1.ex new file mode 100644 index 0000000000..922c59c6a6 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/in_toto_slsa_provenance_v1.ex @@ -0,0 +1,55 @@ +# 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.ContainerAnalysis.V1.Model.InTotoSlsaProvenanceV1 do + @moduledoc """ + + + ## Attributes + + * `_type` (*type:* `String.t`, *default:* `nil`) - InToto spec defined at https://github.com/in-toto/attestation/tree/main/spec#statement + * `predicate` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.SlsaProvenanceV1.t`, *default:* `nil`) - + * `predicateType` (*type:* `String.t`, *default:* `nil`) - + * `subject` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.Subject.t)`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :_type => String.t() | nil, + :predicate => GoogleApi.ContainerAnalysis.V1.Model.SlsaProvenanceV1.t() | nil, + :predicateType => String.t() | nil, + :subject => list(GoogleApi.ContainerAnalysis.V1.Model.Subject.t()) | nil + } + + field(:_type) + field(:predicate, as: GoogleApi.ContainerAnalysis.V1.Model.SlsaProvenanceV1) + field(:predicateType) + field(:subject, as: GoogleApi.ContainerAnalysis.V1.Model.Subject, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.InTotoSlsaProvenanceV1 do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.InTotoSlsaProvenanceV1.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.InTotoSlsaProvenanceV1 do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/justification.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/justification.ex new file mode 100644 index 0000000000..82dbb32d33 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/justification.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1.Model.Justification do + @moduledoc """ + Justification provides the justification when the state of the assessment if NOT_AFFECTED. + + ## Attributes + + * `details` (*type:* `String.t`, *default:* `nil`) - Additional details on why this justification was chosen. + * `justificationType` (*type:* `String.t`, *default:* `nil`) - The justification type for this vulnerability. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :details => String.t() | nil, + :justificationType => String.t() | nil + } + + field(:details) + field(:justificationType) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.Justification do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.Justification.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.Justification do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/note.ex index ef7f0282d3..8293340d1c 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/note.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/note.ex @@ -36,10 +36,12 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.Note do * `package` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.PackageNote.t`, *default:* `nil`) - A note describing a package hosted by various package managers. * `relatedNoteNames` (*type:* `list(String.t)`, *default:* `nil`) - Other notes related to this note. * `relatedUrl` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl.t)`, *default:* `nil`) - URLs associated with this note. + * `sbomReference` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceNote.t`, *default:* `nil`) - A note describing an SBOM reference. * `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this note. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this note was last updated. This field can be used as a filter in list requests. * `upgrade` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.UpgradeNote.t`, *default:* `nil`) - A note describing available package upgrades. * `vulnerability` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityNote.t`, *default:* `nil`) - A note describing a package vulnerability. + * `vulnerabilityAssessment` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityAssessmentNote.t`, *default:* `nil`) - A note describing a vulnerability assessment. """ use GoogleApi.Gax.ModelBase @@ -60,10 +62,13 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.Note do :package => GoogleApi.ContainerAnalysis.V1.Model.PackageNote.t() | nil, :relatedNoteNames => list(String.t()) | nil, :relatedUrl => list(GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl.t()) | nil, + :sbomReference => GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceNote.t() | nil, :shortDescription => String.t() | nil, :updateTime => DateTime.t() | nil, :upgrade => GoogleApi.ContainerAnalysis.V1.Model.UpgradeNote.t() | nil, - :vulnerability => GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityNote.t() | nil + :vulnerability => GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityNote.t() | nil, + :vulnerabilityAssessment => + GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityAssessmentNote.t() | nil } field(:attestation, as: GoogleApi.ContainerAnalysis.V1.Model.AttestationNote) @@ -81,10 +86,15 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.Note do field(:package, as: GoogleApi.ContainerAnalysis.V1.Model.PackageNote) field(:relatedNoteNames, type: :list) field(:relatedUrl, as: GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl, type: :list) + field(:sbomReference, as: GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceNote) field(:shortDescription) field(:updateTime, as: DateTime) field(:upgrade, as: GoogleApi.ContainerAnalysis.V1.Model.UpgradeNote) field(:vulnerability, as: GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityNote) + + field(:vulnerabilityAssessment, + as: GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityAssessmentNote + ) end defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.Note do diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/occurrence.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/occurrence.ex index f653d07e56..5f979843c9 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/occurrence.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/occurrence.ex @@ -36,6 +36,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.Occurrence do * `package` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.PackageOccurrence.t`, *default:* `nil`) - Describes the installation of a package on the linked resource. * `remediation` (*type:* `String.t`, *default:* `nil`) - A description of actions that can be taken to remedy the note. * `resourceUri` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. A URI that represents the resource for which the occurrence applies. For example, `https://gcr.io/project/image@sha256:123abc` for a Docker image. + * `sbomReference` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceOccurrence.t`, *default:* `nil`) - Describes a specific SBOM reference occurrences. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this occurrence was last updated. * `upgrade` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.UpgradeOccurrence.t`, *default:* `nil`) - Describes an available package upgrade on the linked resource. * `vulnerability` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityOccurrence.t`, *default:* `nil`) - Describes a security vulnerability. @@ -60,6 +61,8 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.Occurrence do :package => GoogleApi.ContainerAnalysis.V1.Model.PackageOccurrence.t() | nil, :remediation => String.t() | nil, :resourceUri => String.t() | nil, + :sbomReference => + GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceOccurrence.t() | nil, :updateTime => DateTime.t() | nil, :upgrade => GoogleApi.ContainerAnalysis.V1.Model.UpgradeOccurrence.t() | nil, :vulnerability => GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityOccurrence.t() | nil @@ -80,6 +83,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.Occurrence do field(:package, as: GoogleApi.ContainerAnalysis.V1.Model.PackageOccurrence) field(:remediation) field(:resourceUri) + field(:sbomReference, as: GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceOccurrence) field(:updateTime, as: DateTime) field(:upgrade, as: GoogleApi.ContainerAnalysis.V1.Model.UpgradeOccurrence) field(:vulnerability, as: GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityOccurrence) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/policy.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/policy.ex index c127283cd4..5857dbe0de 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/policy.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.Policy do @moduledoc """ - An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). ## Attributes diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/product.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/product.ex new file mode 100644 index 0000000000..4261ff6882 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/product.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1.Model.Product do + @moduledoc """ + Product contains information about a product and how to uniquely identify it. + + ## Attributes + + * `genericUri` (*type:* `String.t`, *default:* `nil`) - Contains a URI which is vendor-specific. Example: The artifact repository URL of an image. + * `id` (*type:* `String.t`, *default:* `nil`) - Token that identifies a product so that it can be referred to from other parts in the document. There is no predefined format as long as it uniquely identifies a group in the context of the current document. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the product. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :genericUri => String.t() | nil, + :id => String.t() | nil, + :name => String.t() | nil + } + + field(:genericUri) + field(:id) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.Product do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.Product.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.Product do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/provenance_builder.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/provenance_builder.ex new file mode 100644 index 0000000000..7d2bd7bd11 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/provenance_builder.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.ContainerAnalysis.V1.Model.ProvenanceBuilder do + @moduledoc """ + + + ## Attributes + + * `builderDependencies` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor.t)`, *default:* `nil`) - + * `id` (*type:* `String.t`, *default:* `nil`) - + * `version` (*type:* `map()`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :builderDependencies => + list(GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor.t()) | nil, + :id => String.t() | nil, + :version => map() | nil + } + + field(:builderDependencies, + as: GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor, + type: :list + ) + + field(:id) + field(:version, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.ProvenanceBuilder do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.ProvenanceBuilder.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.ProvenanceBuilder do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/publisher.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/publisher.ex new file mode 100644 index 0000000000..bd77902802 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/publisher.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1.Model.Publisher do + @moduledoc """ + Publisher contains information about the publisher of this Note. + + ## Attributes + + * `issuingAuthority` (*type:* `String.t`, *default:* `nil`) - Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the publisher. Examples: 'Google', 'Google Cloud Platform'. + * `publisherNamespace` (*type:* `String.t`, *default:* `nil`) - The context or namespace. Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party. Example: https://csaf.io + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :issuingAuthority => String.t() | nil, + :name => String.t() | nil, + :publisherNamespace => String.t() | nil + } + + field(:issuingAuthority) + field(:name) + field(:publisherNamespace) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.Publisher do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.Publisher.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.Publisher do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/remediation.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/remediation.ex new file mode 100644 index 0000000000..f54e2c496f --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/remediation.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1.Model.Remediation do + @moduledoc """ + Specifies details on how to handle (and presumably, fix) a vulnerability. + + ## Attributes + + * `details` (*type:* `String.t`, *default:* `nil`) - Contains a comprehensive human-readable discussion of the remediation. + * `remediationType` (*type:* `String.t`, *default:* `nil`) - The type of remediation that can be applied. + * `remediationUri` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl.t`, *default:* `nil`) - Contains the URL where to obtain the remediation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :details => String.t() | nil, + :remediationType => String.t() | nil, + :remediationUri => GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl.t() | nil + } + + field(:details) + field(:remediationType) + field(:remediationUri, as: GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.Remediation do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.Remediation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.Remediation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/resource_descriptor.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/resource_descriptor.ex new file mode 100644 index 0000000000..499d2d2dc8 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/resource_descriptor.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.ContainerAnalysis.V1.Model.ResourceDescriptor do + @moduledoc """ + + + ## Attributes + + * `annotations` (*type:* `map()`, *default:* `nil`) - + * `content` (*type:* `String.t`, *default:* `nil`) - + * `digest` (*type:* `map()`, *default:* `nil`) - + * `downloadLocation` (*type:* `String.t`, *default:* `nil`) - + * `mediaType` (*type:* `String.t`, *default:* `nil`) - + * `name` (*type:* `String.t`, *default:* `nil`) - + * `uri` (*type:* `String.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :annotations => map() | nil, + :content => String.t() | nil, + :digest => map() | nil, + :downloadLocation => String.t() | nil, + :mediaType => String.t() | nil, + :name => String.t() | nil, + :uri => String.t() | nil + } + + field(:annotations, type: :map) + field(:content) + field(:digest, type: :map) + field(:downloadLocation) + field(:mediaType) + field(:name) + field(:uri) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/run_details.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/run_details.ex new file mode 100644 index 0000000000..e78e7f8b1a --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/run_details.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1.Model.RunDetails do + @moduledoc """ + + + ## Attributes + + * `builder` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.ProvenanceBuilder.t`, *default:* `nil`) - + * `byproducts` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor.t)`, *default:* `nil`) - + * `metadata` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.BuildMetadata.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :builder => GoogleApi.ContainerAnalysis.V1.Model.ProvenanceBuilder.t() | nil, + :byproducts => list(GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor.t()) | nil, + :metadata => GoogleApi.ContainerAnalysis.V1.Model.BuildMetadata.t() | nil + } + + field(:builder, as: GoogleApi.ContainerAnalysis.V1.Model.ProvenanceBuilder) + field(:byproducts, as: GoogleApi.ContainerAnalysis.V1.Model.ResourceDescriptor, type: :list) + field(:metadata, as: GoogleApi.ContainerAnalysis.V1.Model.BuildMetadata) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.RunDetails do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.RunDetails.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.RunDetails do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_intoto_payload.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_intoto_payload.ex new file mode 100644 index 0000000000..ad86b968df --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_intoto_payload.ex @@ -0,0 +1,56 @@ +# 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.ContainerAnalysis.V1.Model.SbomReferenceIntotoPayload do + @moduledoc """ + The actual payload that contains the SBOM Reference data. The payload follows the intoto statement specification. See https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md for more details. + + ## Attributes + + * `_type` (*type:* `String.t`, *default:* `nil`) - Identifier for the schema of the Statement. + * `predicate` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPredicate.t`, *default:* `nil`) - Additional parameters of the Predicate. Includes the actual data about the SBOM. + * `predicateType` (*type:* `String.t`, *default:* `nil`) - URI identifying the type of the Predicate. + * `subject` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.Subject.t)`, *default:* `nil`) - Set of software artifacts that the attestation applies to. Each element represents a single software artifact. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :_type => String.t() | nil, + :predicate => + GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPredicate.t() | nil, + :predicateType => String.t() | nil, + :subject => list(GoogleApi.ContainerAnalysis.V1.Model.Subject.t()) | nil + } + + field(:_type) + field(:predicate, as: GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPredicate) + field(:predicateType) + field(:subject, as: GoogleApi.ContainerAnalysis.V1.Model.Subject, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPayload do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPayload.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPayload do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_intoto_predicate.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_intoto_predicate.ex new file mode 100644 index 0000000000..ec01931093 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_intoto_predicate.ex @@ -0,0 +1,55 @@ +# 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.ContainerAnalysis.V1.Model.SbomReferenceIntotoPredicate do + @moduledoc """ + A predicate which describes the SBOM being referenced. + + ## Attributes + + * `digest` (*type:* `map()`, *default:* `nil`) - A map of algorithm to digest of the contents of the SBOM. + * `location` (*type:* `String.t`, *default:* `nil`) - The location of the SBOM. + * `mimeType` (*type:* `String.t`, *default:* `nil`) - The mime type of the SBOM. + * `referrerId` (*type:* `String.t`, *default:* `nil`) - The person or system referring this predicate to the consumer. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :digest => map() | nil, + :location => String.t() | nil, + :mimeType => String.t() | nil, + :referrerId => String.t() | nil + } + + field(:digest, type: :map) + field(:location) + field(:mimeType) + field(:referrerId) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPredicate do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPredicate.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPredicate do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_note.ex new file mode 100644 index 0000000000..160aea5d45 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_note.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1.Model.SBOMReferenceNote do + @moduledoc """ + The note representing an SBOM reference. + + ## Attributes + + * `format` (*type:* `String.t`, *default:* `nil`) - The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... + * `version` (*type:* `String.t`, *default:* `nil`) - The version of the format that the SBOM takes. E.g. if the format is spdx, the version may be 2.3. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :format => String.t() | nil, + :version => String.t() | nil + } + + field(:format) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceNote do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceNote.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceNote do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_occurrence.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_occurrence.ex new file mode 100644 index 0000000000..142330d226 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_reference_occurrence.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1.Model.SBOMReferenceOccurrence do + @moduledoc """ + The occurrence representing an SBOM reference as applied to a specific resource. The occurrence follows the DSSE specification. See https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more details. + + ## Attributes + + * `payload` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPayload.t`, *default:* `nil`) - The actual payload that contains the SBOM reference data. + * `payloadType` (*type:* `String.t`, *default:* `nil`) - The kind of payload that SbomReferenceIntotoPayload takes. Since it's in the intoto format, this value is expected to be 'application/vnd.in-toto+json'. + * `signatures` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.EnvelopeSignature.t)`, *default:* `nil`) - The signatures over the payload. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :payload => GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPayload.t() | nil, + :payloadType => String.t() | nil, + :signatures => list(GoogleApi.ContainerAnalysis.V1.Model.EnvelopeSignature.t()) | nil + } + + field(:payload, as: GoogleApi.ContainerAnalysis.V1.Model.SbomReferenceIntotoPayload) + field(:payloadType) + field(:signatures, as: GoogleApi.ContainerAnalysis.V1.Model.EnvelopeSignature, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceOccurrence do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceOccurrence.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.SBOMReferenceOccurrence do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_status.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_status.ex new file mode 100644 index 0000000000..681a25741d --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/sbom_status.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1.Model.SBOMStatus do + @moduledoc """ + The status of an SBOM generation. + + ## Attributes + + * `error` (*type:* `String.t`, *default:* `nil`) - If there was an error generating an SBOM, this will indicate what that error was. + * `sbomState` (*type:* `String.t`, *default:* `nil`) - The progress of the SBOM generation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :error => String.t() | nil, + :sbomState => String.t() | nil + } + + field(:error) + field(:sbomState) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.SBOMStatus do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.SBOMStatus.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.SBOMStatus do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/slsa_provenance_v1.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/slsa_provenance_v1.ex new file mode 100644 index 0000000000..737a4693c5 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/slsa_provenance_v1.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1.Model.SlsaProvenanceV1 do + @moduledoc """ + Keep in sync with schema at https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto Builder renamed to ProvenanceBuilder because of Java conflicts. + + ## Attributes + + * `buildDefinition` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.BuildDefinition.t`, *default:* `nil`) - + * `runDetails` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.RunDetails.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :buildDefinition => GoogleApi.ContainerAnalysis.V1.Model.BuildDefinition.t() | nil, + :runDetails => GoogleApi.ContainerAnalysis.V1.Model.RunDetails.t() | nil + } + + field(:buildDefinition, as: GoogleApi.ContainerAnalysis.V1.Model.BuildDefinition) + field(:runDetails, as: GoogleApi.ContainerAnalysis.V1.Model.RunDetails) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.SlsaProvenanceV1 do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.SlsaProvenanceV1.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.SlsaProvenanceV1 do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/vex_assessment.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/vex_assessment.ex new file mode 100644 index 0000000000..ce1d56a469 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/vex_assessment.ex @@ -0,0 +1,67 @@ +# 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.ContainerAnalysis.V1.Model.VexAssessment do + @moduledoc """ + VexAssessment provides all publisher provided Vex information that is related to this vulnerability. + + ## Attributes + + * `cve` (*type:* `String.t`, *default:* `nil`) - Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. Deprecated: Use vulnerability_id instead to denote CVEs. + * `impacts` (*type:* `list(String.t)`, *default:* `nil`) - Contains information about the impact of this vulnerability, this will change with time. + * `justification` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.Justification.t`, *default:* `nil`) - Justification provides the justification when the state of the assessment if NOT_AFFECTED. + * `noteName` (*type:* `String.t`, *default:* `nil`) - The VulnerabilityAssessment note from which this VexAssessment was generated. This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. + * `relatedUris` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl.t)`, *default:* `nil`) - Holds a list of references associated with this vulnerability item and assessment. + * `remediations` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.Remediation.t)`, *default:* `nil`) - Specifies details on how to handle (and presumably, fix) a vulnerability. + * `state` (*type:* `String.t`, *default:* `nil`) - Provides the state of this Vulnerability assessment. + * `vulnerabilityId` (*type:* `String.t`, *default:* `nil`) - The vulnerability identifier for this Assessment. Will hold one of common identifiers e.g. CVE, GHSA etc. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cve => String.t() | nil, + :impacts => list(String.t()) | nil, + :justification => GoogleApi.ContainerAnalysis.V1.Model.Justification.t() | nil, + :noteName => String.t() | nil, + :relatedUris => list(GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl.t()) | nil, + :remediations => list(GoogleApi.ContainerAnalysis.V1.Model.Remediation.t()) | nil, + :state => String.t() | nil, + :vulnerabilityId => String.t() | nil + } + + field(:cve) + field(:impacts, type: :list) + field(:justification, as: GoogleApi.ContainerAnalysis.V1.Model.Justification) + field(:noteName) + field(:relatedUris, as: GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl, type: :list) + field(:remediations, as: GoogleApi.ContainerAnalysis.V1.Model.Remediation, type: :list) + field(:state) + field(:vulnerabilityId) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.VexAssessment do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.VexAssessment.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.VexAssessment do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_assessment_note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_assessment_note.ex new file mode 100644 index 0000000000..be761c142b --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_assessment_note.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.ContainerAnalysis.V1.Model.VulnerabilityAssessmentNote do + @moduledoc """ + A single VulnerabilityAssessmentNote represents one particular product's vulnerability assessment for one CVE. + + ## Attributes + + * `assessment` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.Assessment.t`, *default:* `nil`) - Represents a vulnerability assessment for the product. + * `languageCode` (*type:* `String.t`, *default:* `nil`) - Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646. + * `longDescription` (*type:* `String.t`, *default:* `nil`) - A detailed description of this Vex. + * `product` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.Product.t`, *default:* `nil`) - The product affected by this vex. + * `publisher` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.Publisher.t`, *default:* `nil`) - Publisher details of this Note. + * `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this Vex. + * `title` (*type:* `String.t`, *default:* `nil`) - The title of the note. E.g. `Vex-Debian-11.4` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :assessment => GoogleApi.ContainerAnalysis.V1.Model.Assessment.t() | nil, + :languageCode => String.t() | nil, + :longDescription => String.t() | nil, + :product => GoogleApi.ContainerAnalysis.V1.Model.Product.t() | nil, + :publisher => GoogleApi.ContainerAnalysis.V1.Model.Publisher.t() | nil, + :shortDescription => String.t() | nil, + :title => String.t() | nil + } + + field(:assessment, as: GoogleApi.ContainerAnalysis.V1.Model.Assessment) + field(:languageCode) + field(:longDescription) + field(:product, as: GoogleApi.ContainerAnalysis.V1.Model.Product) + field(:publisher, as: GoogleApi.ContainerAnalysis.V1.Model.Publisher) + field(:shortDescription) + field(:title) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityAssessmentNote do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityAssessmentNote.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityAssessmentNote do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_note.ex index 5baf16986f..a40b59733f 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_note.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_note.ex @@ -22,6 +22,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityNote do ## Attributes * `cvssScore` (*type:* `number()`, *default:* `nil`) - The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity. + * `cvssV2` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.CVSS.t`, *default:* `nil`) - The full description of the v2 CVSS for this vulnerability. * `cvssV3` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.CVSSv3.t`, *default:* `nil`) - The full description of the CVSSv3 for this vulnerability. * `cvssVersion` (*type:* `String.t`, *default:* `nil`) - CVSS version used to populate cvss_score and severity. * `details` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.Detail.t)`, *default:* `nil`) - Details of all known distros and packages affected by this vulnerability. @@ -34,6 +35,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityNote do @type t :: %__MODULE__{ :cvssScore => number() | nil, + :cvssV2 => GoogleApi.ContainerAnalysis.V1.Model.CVSS.t() | nil, :cvssV3 => GoogleApi.ContainerAnalysis.V1.Model.CVSSv3.t() | nil, :cvssVersion => String.t() | nil, :details => list(GoogleApi.ContainerAnalysis.V1.Model.Detail.t()) | nil, @@ -43,6 +45,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityNote do } field(:cvssScore) + field(:cvssV2, as: GoogleApi.ContainerAnalysis.V1.Model.CVSS) field(:cvssV3, as: GoogleApi.ContainerAnalysis.V1.Model.CVSSv3) field(:cvssVersion) field(:details, as: GoogleApi.ContainerAnalysis.V1.Model.Detail, type: :list) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_occurrence.ex b/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_occurrence.ex index 7ed30cb5b8..9989205079 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_occurrence.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1/model/vulnerability_occurrence.ex @@ -22,9 +22,11 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityOccurrence do ## Attributes * `cvssScore` (*type:* `number()`, *default:* `nil`) - Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity. + * `cvssV2` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.CVSS.t`, *default:* `nil`) - The cvss v2 score for the vulnerability. * `cvssVersion` (*type:* `String.t`, *default:* `nil`) - Output only. CVSS version used to populate cvss_score and severity. * `cvssv3` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.CVSS.t`, *default:* `nil`) - The cvss v3 score for the vulnerability. * `effectiveSeverity` (*type:* `String.t`, *default:* `nil`) - The distro assigned severity for this vulnerability when it is available, otherwise this is the note provider assigned severity. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues. + * `extraDetails` (*type:* `String.t`, *default:* `nil`) - Occurrence-specific extra details about the vulnerability. * `fixAvailable` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether at least one of the affected packages has a fix available. * `longDescription` (*type:* `String.t`, *default:* `nil`) - Output only. A detailed description of this vulnerability. * `packageIssue` (*type:* `list(GoogleApi.ContainerAnalysis.V1.Model.PackageIssue.t)`, *default:* `nil`) - Required. The set of affected locations and their fixes (if available) within the associated resource. @@ -32,28 +34,34 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityOccurrence do * `severity` (*type:* `String.t`, *default:* `nil`) - Output only. The note provider assigned severity of this vulnerability. * `shortDescription` (*type:* `String.t`, *default:* `nil`) - Output only. A one sentence description of this vulnerability. * `type` (*type:* `String.t`, *default:* `nil`) - The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.). + * `vexAssessment` (*type:* `GoogleApi.ContainerAnalysis.V1.Model.VexAssessment.t`, *default:* `nil`) - """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :cvssScore => number() | nil, + :cvssV2 => GoogleApi.ContainerAnalysis.V1.Model.CVSS.t() | nil, :cvssVersion => String.t() | nil, :cvssv3 => GoogleApi.ContainerAnalysis.V1.Model.CVSS.t() | nil, :effectiveSeverity => String.t() | nil, + :extraDetails => String.t() | nil, :fixAvailable => boolean() | nil, :longDescription => String.t() | nil, :packageIssue => list(GoogleApi.ContainerAnalysis.V1.Model.PackageIssue.t()) | nil, :relatedUrls => list(GoogleApi.ContainerAnalysis.V1.Model.RelatedUrl.t()) | nil, :severity => String.t() | nil, :shortDescription => String.t() | nil, - :type => String.t() | nil + :type => String.t() | nil, + :vexAssessment => GoogleApi.ContainerAnalysis.V1.Model.VexAssessment.t() | nil } field(:cvssScore) + field(:cvssV2, as: GoogleApi.ContainerAnalysis.V1.Model.CVSS) field(:cvssVersion) field(:cvssv3, as: GoogleApi.ContainerAnalysis.V1.Model.CVSS) field(:effectiveSeverity) + field(:extraDetails) field(:fixAvailable) field(:longDescription) field(:packageIssue, as: GoogleApi.ContainerAnalysis.V1.Model.PackageIssue, type: :list) @@ -61,6 +69,7 @@ defmodule GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityOccurrence do field(:severity) field(:shortDescription) field(:type) + field(:vexAssessment, as: GoogleApi.ContainerAnalysis.V1.Model.VexAssessment) end defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1.Model.VulnerabilityOccurrence do diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/metadata.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/metadata.ex index 5ed80daa1f..26396a880b 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/metadata.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1 do API client metadata for GoogleApi.ContainerAnalysis.V1alpha1. """ - @discovery_revision "20221112" + @discovery_revision "20240301" def discovery_revision(), do: @discovery_revision end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/assessment.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/assessment.ex new file mode 100644 index 0000000000..1336f8f589 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/assessment.ex @@ -0,0 +1,70 @@ +# 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.ContainerAnalysis.V1alpha1.Model.Assessment do + @moduledoc """ + Assessment provides all information that is related to a single vulnerability for this product. + + ## Attributes + + * `cve` (*type:* `String.t`, *default:* `nil`) - Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. + * `impacts` (*type:* `list(String.t)`, *default:* `nil`) - Contains information about the impact of this vulnerability, this will change with time. + * `justification` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Justification.t`, *default:* `nil`) - Justification provides the justification when the state of the assessment if NOT_AFFECTED. + * `longDescription` (*type:* `String.t`, *default:* `nil`) - A detailed description of this Vex. + * `relatedUris` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.URI.t)`, *default:* `nil`) - Holds a list of references associated with this vulnerability item and assessment. These uris have additional information about the vulnerability and the assessment itself. E.g. Link to a document which details how this assessment concluded the state of this vulnerability. + * `remediations` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.Remediation.t)`, *default:* `nil`) - Specifies details on how to handle (and presumably, fix) a vulnerability. + * `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this Vex. + * `state` (*type:* `String.t`, *default:* `nil`) - Provides the state of this Vulnerability assessment. + * `vulnerabilityId` (*type:* `String.t`, *default:* `nil`) - The vulnerability identifier for this Assessment. Will hold one of common identifiers e.g. CVE, GHSA etc. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cve => String.t() | nil, + :impacts => list(String.t()) | nil, + :justification => GoogleApi.ContainerAnalysis.V1alpha1.Model.Justification.t() | nil, + :longDescription => String.t() | nil, + :relatedUris => list(GoogleApi.ContainerAnalysis.V1alpha1.Model.URI.t()) | nil, + :remediations => list(GoogleApi.ContainerAnalysis.V1alpha1.Model.Remediation.t()) | nil, + :shortDescription => String.t() | nil, + :state => String.t() | nil, + :vulnerabilityId => String.t() | nil + } + + field(:cve) + field(:impacts, type: :list) + field(:justification, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Justification) + field(:longDescription) + field(:relatedUris, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.URI, type: :list) + field(:remediations, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Remediation, type: :list) + field(:shortDescription) + field(:state) + field(:vulnerabilityId) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Assessment do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.Assessment.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Assessment do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/binding.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/binding.ex index 8e72d03679..10f44c5b8b 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/binding.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/binding.ex @@ -22,8 +22,8 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Expr.t`, *default:* `nil`) - The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. - * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). """ use GoogleApi.Gax.ModelBase diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_definition.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_definition.ex new file mode 100644 index 0000000000..f13ec69fb8 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_definition.ex @@ -0,0 +1,60 @@ +# 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.ContainerAnalysis.V1alpha1.Model.BuildDefinition do + @moduledoc """ + + + ## Attributes + + * `buildType` (*type:* `String.t`, *default:* `nil`) - + * `externalParameters` (*type:* `map()`, *default:* `nil`) - + * `internalParameters` (*type:* `map()`, *default:* `nil`) - + * `resolvedDependencies` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor.t)`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :buildType => String.t() | nil, + :externalParameters => map() | nil, + :internalParameters => map() | nil, + :resolvedDependencies => + list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor.t()) | nil + } + + field(:buildType) + field(:externalParameters, type: :map) + field(:internalParameters, type: :map) + + field(:resolvedDependencies, + as: GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildDefinition do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildDefinition.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildDefinition do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_details.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_details.ex index 82c6fb5837..f007ff5461 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_details.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_details.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildDetails do ## Attributes + * `inTotoSlsaProvenanceV1` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoSlsaProvenanceV1.t`, *default:* `nil`) - In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa spec, wrapped in an in-toto statement. This allows for direct jsonification of a to-spec in-toto slsa statement with a to-spec slsa provenance. * `intotoProvenance` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoProvenance.t`, *default:* `nil`) - Deprecated. See InTotoStatement for the replacement. In-toto Provenance representation as defined in spec. * `intotoStatement` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoStatement.t`, *default:* `nil`) - In-toto Statement representation as defined in spec. The intoto_statement can contain any type of provenance. The serialized payload of the statement can be stored and signed in the Occurrence's envelope. * `provenance` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildProvenance.t`, *default:* `nil`) - The actual provenance @@ -30,6 +31,8 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildDetails do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :inTotoSlsaProvenanceV1 => + GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoSlsaProvenanceV1.t() | nil, :intotoProvenance => GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoProvenance.t() | nil, :intotoStatement => @@ -38,6 +41,10 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildDetails do :provenanceBytes => String.t() | nil } + field(:inTotoSlsaProvenanceV1, + as: GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoSlsaProvenanceV1 + ) + field(:intotoProvenance, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoProvenance) field(:intotoStatement, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoStatement) field(:provenance, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildProvenance) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_metadata.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_metadata.ex new file mode 100644 index 0000000000..923be85d2e --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_metadata.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1alpha1.Model.BuildMetadata do + @moduledoc """ + + + ## Attributes + + * `finishedOn` (*type:* `DateTime.t`, *default:* `nil`) - + * `invocationId` (*type:* `String.t`, *default:* `nil`) - + * `startedOn` (*type:* `DateTime.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :finishedOn => DateTime.t() | nil, + :invocationId => String.t() | nil, + :startedOn => DateTime.t() | nil + } + + field(:finishedOn, as: DateTime) + field(:invocationId) + field(:startedOn, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildMetadata do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_step.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_step.ex index 9aef917f04..093af23432 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_step.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/build_step.ex @@ -17,13 +17,14 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildStep do @moduledoc """ - A step in the build pipeline. Next ID: 20 + A step in the build pipeline. Next ID: 21 ## Attributes * `allowExitCodes` (*type:* `list(integer())`, *default:* `nil`) - Allow this build step to fail without failing the entire build if and only if the exit code is one of the specified codes. If allow_failure is also specified, this field will take precedence. * `allowFailure` (*type:* `boolean()`, *default:* `nil`) - Allow this build step to fail without failing the entire build. If false, the entire build will fail if this step fails. Otherwise, the build will succeed, but this step will still have a failure status. Error information will be reported in the failure_detail field. * `args` (*type:* `list(String.t)`, *default:* `nil`) - A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. + * `automapSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to include built-in and custom substitutions as env variables for this build step. This option will override the global option in BuildOption. * `dir` (*type:* `String.t`, *default:* `nil`) - Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. * `entrypoint` (*type:* `String.t`, *default:* `nil`) - Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used. * `env` (*type:* `list(String.t)`, *default:* `nil`) - A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". @@ -46,6 +47,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildStep do :allowExitCodes => list(integer()) | nil, :allowFailure => boolean() | nil, :args => list(String.t()) | nil, + :automapSubstitutions => boolean() | nil, :dir => String.t() | nil, :entrypoint => String.t() | nil, :env => list(String.t()) | nil, @@ -65,6 +67,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildStep do field(:allowExitCodes, type: :list) field(:allowFailure) field(:args, type: :list) + field(:automapSubstitutions) field(:dir) field(:entrypoint) field(:env, type: :list) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/compliance_note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/compliance_note.ex index 8eea31e092..9b5d0113a0 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/compliance_note.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/compliance_note.ex @@ -23,6 +23,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ComplianceNote do * `cisBenchmark` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.CisBenchmark.t`, *default:* `nil`) - Right now we only have one compliance type, but we may add additional types in the future. * `description` (*type:* `String.t`, *default:* `nil`) - A description about this compliance check. + * `impact` (*type:* `String.t`, *default:* `nil`) - Potential impact of the suggested remediation * `rationale` (*type:* `String.t`, *default:* `nil`) - A rationale for the existence of this compliance check. * `remediation` (*type:* `String.t`, *default:* `nil`) - A description of remediation steps if the compliance check fails. * `scanInstructions` (*type:* `String.t`, *default:* `nil`) - Serialized scan instructions with a predefined format. @@ -35,6 +36,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ComplianceNote do @type t :: %__MODULE__{ :cisBenchmark => GoogleApi.ContainerAnalysis.V1alpha1.Model.CisBenchmark.t() | nil, :description => String.t() | nil, + :impact => String.t() | nil, :rationale => String.t() | nil, :remediation => String.t() | nil, :scanInstructions => String.t() | nil, @@ -44,6 +46,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ComplianceNote do field(:cisBenchmark, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.CisBenchmark) field(:description) + field(:impact) field(:rationale) field(:remediation) field(:scanInstructions) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex index bf010f5fec..12a12933c0 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex @@ -23,6 +23,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt * `images` (*type:* `list(String.t)`, *default:* `nil`) - A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE. * `mavenArtifacts` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact.t)`, *default:* `nil`) - A list of Maven artifacts to be uploaded to Artifact Registry upon successful completion of all build steps. Artifacts in the workspace matching specified paths globs will be uploaded to the specified Artifact Registry repository using the builder service account's credentials. If any artifacts fail to be pushed, the build is marked FAILURE. + * `npmPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage.t)`, *default:* `nil`) - A list of npm packages to be uploaded to Artifact Registry upon successful completion of all build steps. Npm packages in the specified paths will be uploaded to the specified Artifact Registry repository using the builder service account's credentials. If any packages fail to be pushed, the build is marked FAILURE. * `objects` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects.t`, *default:* `nil`) - A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. * `pythonPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage.t)`, *default:* `nil`) - A list of Python packages to be uploaded to Artifact Registry upon successful completion of all build steps. The build service account credentials will be used to perform the upload. If any objects fail to be pushed, the build is marked FAILURE. """ @@ -36,6 +37,11 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact.t() ) | nil, + :npmPackages => + list( + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage.t() + ) + | nil, :objects => GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects.t() | nil, @@ -54,6 +60,12 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt type: :list ) + field(:npmPackages, + as: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage, + type: :list + ) + field(:objects, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts_npm_package.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts_npm_package.ex new file mode 100644 index 0000000000..28a5dc58ab --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts_npm_package.ex @@ -0,0 +1,56 @@ +# 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.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage do + @moduledoc """ + Npm package to upload to Artifact Registry upon successful completion of all build steps. + + ## Attributes + + * `packagePath` (*type:* `String.t`, *default:* `nil`) - Path to the package.json. e.g. workspace/path/to/package + * `repository` (*type:* `String.t`, *default:* `nil`) - Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :packagePath => String.t() | nil, + :repository => String.t() | nil + } + + field(:packagePath) + field(:repository) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex index 69d02a5140..956485f0a5 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex @@ -31,7 +31,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt * `id` (*type:* `String.t`, *default:* `nil`) - Output only. Unique identifier of the build. * `images` (*type:* `list(String.t)`, *default:* `nil`) - A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`. * `logUrl` (*type:* `String.t`, *default:* `nil`) - Output only. URL to logs for this build in Google Cloud Console. - * `logsBucket` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + * `logsBucket` (*type:* `String.t`, *default:* `nil`) - Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The 'Build' name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service. * `options` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions.t`, *default:* `nil`) - Special options for this build. * `projectId` (*type:* `String.t`, *default:* `nil`) - Output only. ID of the project. @@ -47,7 +47,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt * `steps` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep.t)`, *default:* `nil`) - Required. The operations to be performed on the workspace. * `substitutions` (*type:* `map()`, *default:* `nil`) - Substitutions data for `Build` resource. * `tags` (*type:* `list(String.t)`, *default:* `nil`) - Tags for annotation of a `Build`. These are not docker tags. - * `timeout` (*type:* `String.t`, *default:* `nil`) - Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes. + * `timeout` (*type:* `String.t`, *default:* `nil`) - Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes. * `timing` (*type:* `%{optional(String.t) => GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t}`, *default:* `nil`) - Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps. * PUSH: time to push all artifacts including docker images and non docker artifacts. * FETCHSOURCE: time to fetch source. * SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included. * `warnings` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning.t)`, *default:* `nil`) - Output only. Non-fatal problems encountered during the execution of the build. """ diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex index 42b0e08f8c..bed9b1a6ea 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex @@ -21,10 +21,12 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt ## Attributes + * `automapSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to include built-in and custom substitutions as env variables for all build steps. + * `defaultLogsBucketBehavior` (*type:* `String.t`, *default:* `nil`) - Optional. Option to specify how default logs buckets are setup. * `diskSizeGb` (*type:* `String.t`, *default:* `nil`) - Requested disk size for the VM that runs the build. Note that this is *NOT* "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 2000GB; builds that request more than the maximum are rejected with an error. * `dynamicSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file. * `env` (*type:* `list(String.t)`, *default:* `nil`) - A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". - * `logStreamingOption` (*type:* `String.t`, *default:* `nil`) - Option to define build log streaming behavior to Google Cloud Storage. + * `logStreamingOption` (*type:* `String.t`, *default:* `nil`) - Option to define build log streaming behavior to Cloud Storage. * `logging` (*type:* `String.t`, *default:* `nil`) - Option to specify the logging mode, which determines if and where build logs are stored. * `machineType` (*type:* `String.t`, *default:* `nil`) - Compute Engine machine type on which to run the build. * `pool` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption.t`, *default:* `nil`) - Optional. Specification for execution on a `WorkerPool`. See [running builds in a private pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) for more information. @@ -39,6 +41,8 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :automapSubstitutions => boolean() | nil, + :defaultLogsBucketBehavior => String.t() | nil, :diskSizeGb => String.t() | nil, :dynamicSubstitutions => boolean() | nil, :env => list(String.t()) | nil, @@ -60,6 +64,8 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt :workerPool => String.t() | nil } + field(:automapSubstitutions) + field(:defaultLogsBucketBehavior) field(:diskSizeGb) field(:dynamicSubstitutions) field(:env, type: :list) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex index 5070001023..e4e49b33fa 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt * `allowExitCodes` (*type:* `list(integer())`, *default:* `nil`) - Allow this build step to fail without failing the entire build if and only if the exit code is one of the specified codes. If allow_failure is also specified, this field will take precedence. * `allowFailure` (*type:* `boolean()`, *default:* `nil`) - Allow this build step to fail without failing the entire build. If false, the entire build will fail if this step fails. Otherwise, the build will succeed, but this step will still have a failure status. Error information will be reported in the failure_detail field. * `args` (*type:* `list(String.t)`, *default:* `nil`) - A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. + * `automapSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to include built-in and custom substitutions as env variables for this build step. This option will override the global option in BuildOption. * `dir` (*type:* `String.t`, *default:* `nil`) - Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. * `entrypoint` (*type:* `String.t`, *default:* `nil`) - Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used. * `env` (*type:* `list(String.t)`, *default:* `nil`) - A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". @@ -46,6 +47,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt :allowExitCodes => list(integer()) | nil, :allowFailure => boolean() | nil, :args => list(String.t()) | nil, + :automapSubstitutions => boolean() | nil, :dir => String.t() | nil, :entrypoint => String.t() | nil, :env => list(String.t()) | nil, @@ -73,6 +75,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt field(:allowExitCodes, type: :list) field(:allowFailure) field(:args, type: :list) + field(:automapSubstitutions) field(:dir) field(:entrypoint) field(:env, type: :list) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_connected_repository.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_connected_repository.ex new file mode 100644 index 0000000000..eea0f58dca --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_connected_repository.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.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository do + @moduledoc """ + Location of the source in a 2nd-gen Google Cloud Build repository resource. + + ## Attributes + + * `dir` (*type:* `String.t`, *default:* `nil`) - Directory, relative to the source root, in which to run the build. + * `repository` (*type:* `String.t`, *default:* `nil`) - Required. Name of the Google Cloud Build repository, formatted as `projects/*/locations/*/connections/*/repositories/*`. + * `revision` (*type:* `String.t`, *default:* `nil`) - The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dir => String.t() | nil, + :repository => String.t() | nil, + :revision => String.t() | nil + } + + field(:dir) + field(:repository) + field(:revision) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_git_source.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_git_source.ex new file mode 100644 index 0000000000..4fffa3753d --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_git_source.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.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource do + @moduledoc """ + Location of the source in any accessible Git repository. + + ## Attributes + + * `dir` (*type:* `String.t`, *default:* `nil`) - Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. + * `revision` (*type:* `String.t`, *default:* `nil`) - The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses `git fetch` to fetch the revision from the Git repository; therefore make sure that the string you provide for `revision` is parsable by the command. For information on string values accepted by `git fetch`, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on `git fetch`, see https://git-scm.com/docs/git-fetch. + * `url` (*type:* `String.t`, *default:* `nil`) - Location of the Git repo to build. This will be used as a `git remote`, see https://git-scm.com/docs/git-remote. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dir => String.t() | nil, + :revision => String.t() | nil, + :url => String.t() | nil + } + + field(:dir) + field(:revision) + field(:url) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex index 61740e8b35..ce9f5584bd 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex @@ -24,9 +24,10 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt * `artifactManifest` (*type:* `String.t`, *default:* `nil`) - Path to the artifact manifest for non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage. * `artifactTiming` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t`, *default:* `nil`) - Time to push all non-container artifacts to Cloud Storage. * `buildStepImages` (*type:* `list(String.t)`, *default:* `nil`) - List of build step digests, in the order corresponding to build step indices. - * `buildStepOutputs` (*type:* `list(String.t)`, *default:* `nil`) - List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored. + * `buildStepOutputs` (*type:* `list(String.t)`, *default:* `nil`) - List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data is stored. * `images` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage.t)`, *default:* `nil`) - Container images that were built as a part of the build. * `mavenArtifacts` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact.t)`, *default:* `nil`) - Maven artifacts uploaded to Artifact Registry at the end of the build. + * `npmPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage.t)`, *default:* `nil`) - Npm packages uploaded to Artifact Registry at the end of the build. * `numArtifacts` (*type:* `String.t`, *default:* `nil`) - Number of non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage. * `pythonPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage.t)`, *default:* `nil`) - Python artifacts uploaded to Artifact Registry at the end of the build. """ @@ -50,6 +51,11 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact.t() ) | nil, + :npmPackages => + list( + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage.t() + ) + | nil, :numArtifacts => String.t() | nil, :pythonPackages => list( @@ -80,6 +86,12 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt type: :list ) + field(:npmPackages, + as: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage, + type: :list + ) + field(:numArtifacts) field(:pythonPackages, diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex index f0a2fda625..dc82a416a9 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex @@ -21,14 +21,22 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt ## Attributes + * `connectedRepository` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t`, *default:* `nil`) - Optional. If provided, get the source from this 2nd-gen Google Cloud Build repository resource. + * `gitSource` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t`, *default:* `nil`) - If provided, get the source from this Git repository. * `repoSource` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t`, *default:* `nil`) - If provided, get the source from this location in a Cloud Source Repository. - * `storageSource` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource.t`, *default:* `nil`) - If provided, get the source from this location in Google Cloud Storage. - * `storageSourceManifest` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest.t`, *default:* `nil`) - If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). + * `storageSource` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource.t`, *default:* `nil`) - If provided, get the source from this location in Cloud Storage. + * `storageSourceManifest` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest.t`, *default:* `nil`) - If provided, get the source from this manifest in Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :connectedRepository => + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t() + | nil, + :gitSource => + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t() + | nil, :repoSource => GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t() | nil, @@ -40,6 +48,16 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt | nil } + field(:connectedRepository, + as: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository + ) + + field(:gitSource, + as: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource + ) + field(:repoSource, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex index cdc24e3dbb..de66157637 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex @@ -22,6 +22,8 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt ## Attributes * `fileHashes` (*type:* `%{optional(String.t) => GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t}`, *default:* `nil`) - Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file. + * `resolvedConnectedRepository` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t`, *default:* `nil`) - Output only. A copy of the build's `source.connected_repository`, if exists, with any revisions resolved. + * `resolvedGitSource` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t`, *default:* `nil`) - Output only. A copy of the build's `source.git_source`, if exists, with any revisions resolved. * `resolvedRepoSource` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t`, *default:* `nil`) - A copy of the build's `source.repo_source`, if exists, with any revisions resolved. * `resolvedStorageSource` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource.t`, *default:* `nil`) - A copy of the build's `source.storage_source`, if exists, with any generations resolved. * `resolvedStorageSourceManifest` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest.t`, *default:* `nil`) - A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview. @@ -36,6 +38,12 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t() } | nil, + :resolvedConnectedRepository => + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t() + | nil, + :resolvedGitSource => + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t() + | nil, :resolvedRepoSource => GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t() | nil, @@ -53,6 +61,16 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt type: :map ) + field(:resolvedConnectedRepository, + as: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository + ) + + field(:resolvedGitSource, + as: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource + ) + field(:resolvedRepoSource, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex index 92bf98419f..280dd4abdb 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex @@ -17,13 +17,14 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource do @moduledoc """ - Location of the source in an archive file in Google Cloud Storage. + Location of the source in an archive file in Cloud Storage. ## Attributes - * `bucket` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * `generation` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. - * `object` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage object containing the source. This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to build. + * `bucket` (*type:* `String.t`, *default:* `nil`) - Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * `generation` (*type:* `String.t`, *default:* `nil`) - Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + * `object` (*type:* `String.t`, *default:* `nil`) - Cloud Storage object containing the source. This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to build. + * `sourceFetcher` (*type:* `String.t`, *default:* `nil`) - Optional. Option to specify the tool to fetch the source file for the build. """ use GoogleApi.Gax.ModelBase @@ -31,12 +32,14 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevt @type t :: %__MODULE__{ :bucket => String.t() | nil, :generation => String.t() | nil, - :object => String.t() | nil + :object => String.t() | nil, + :sourceFetcher => String.t() | nil } field(:bucket) field(:generation) field(:object) + field(:sourceFetcher) end defimpl Poison.Decoder, diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex index 2462b84adb..9974dd400f 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex @@ -17,13 +17,13 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest do @moduledoc """ - Location of the source manifest in Google Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). + Location of the source manifest in Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). ## Attributes - * `bucket` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * `generation` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. - * `object` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage object containing the source manifest. This object must be a JSON file. + * `bucket` (*type:* `String.t`, *default:* `nil`) - Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * `generation` (*type:* `String.t`, *default:* `nil`) - Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + * `object` (*type:* `String.t`, *default:* `nil`) - Cloud Storage object containing the source manifest. This object must be a JSON file. """ use GoogleApi.Gax.ModelBase diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_uploaded_npm_package.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_uploaded_npm_package.ex new file mode 100644 index 0000000000..f3369aa4eb --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/containeranalysis_google_devtools_cloudbuild_v1_uploaded_npm_package.ex @@ -0,0 +1,71 @@ +# 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.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage do + @moduledoc """ + An npm package uploaded to Artifact Registry using the NpmPackage directive. + + ## Attributes + + * `fileHashes` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t`, *default:* `nil`) - Hash types and values of the npm package. + * `pushTiming` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t`, *default:* `nil`) - Output only. Stores timing information for pushing the specified artifact. + * `uri` (*type:* `String.t`, *default:* `nil`) - URI of the uploaded npm package. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fileHashes => + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t() + | nil, + :pushTiming => + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t() + | nil, + :uri => String.t() | nil + } + + field(:fileHashes, + as: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes + ) + + field(:pushTiming, + as: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan + ) + + field(:uri) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1alpha1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/discovered.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/discovered.ex index d136faf7f6..788990a275 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/discovered.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/discovered.ex @@ -30,6 +30,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Discovered do * `cpe` (*type:* `String.t`, *default:* `nil`) - The CPE of the resource being scanned. * `lastScanTime` (*type:* `DateTime.t`, *default:* `nil`) - The last time this resource was scanned. * `operation` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Operation.t`, *default:* `nil`) - Output only. An operation that indicates the status of the current scan. This field is deprecated, do not use. + * `sbomStatus` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMStatus.t`, *default:* `nil`) - Output only. The status of an SBOM generation. """ use GoogleApi.Gax.ModelBase @@ -44,7 +45,8 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Discovered do :continuousAnalysis => String.t() | nil, :cpe => String.t() | nil, :lastScanTime => DateTime.t() | nil, - :operation => GoogleApi.ContainerAnalysis.V1alpha1.Model.Operation.t() | nil + :operation => GoogleApi.ContainerAnalysis.V1alpha1.Model.Operation.t() | nil, + :sbomStatus => GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMStatus.t() | nil } field(:analysisCompleted, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.AnalysisCompleted) @@ -56,6 +58,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Discovered do field(:cpe) field(:lastScanTime, as: DateTime) field(:operation, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Operation) + field(:sbomStatus, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMStatus) end defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Discovered do diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/identifier_helper.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/identifier_helper.ex new file mode 100644 index 0000000000..f1ecaded6e --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/identifier_helper.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1alpha1.Model.IdentifierHelper do + @moduledoc """ + Helps in identifying the underlying product. This should be treated like a one-of field. Only one field should be set in this proto. This is a workaround because spanner indexes on one-of fields restrict addition and deletion of fields. + + ## Attributes + + * `field` (*type:* `String.t`, *default:* `nil`) - The field that is set in the API proto. + * `genericUri` (*type:* `String.t`, *default:* `nil`) - Contains a URI which is vendor-specific. Example: The artifact repository URL of an image. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :field => String.t() | nil, + :genericUri => String.t() | nil + } + + field(:field) + field(:genericUri) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.IdentifierHelper do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.IdentifierHelper.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.IdentifierHelper do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/in_toto_slsa_provenance_v1.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/in_toto_slsa_provenance_v1.ex new file mode 100644 index 0000000000..cb140494b5 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/in_toto_slsa_provenance_v1.ex @@ -0,0 +1,55 @@ +# 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.ContainerAnalysis.V1alpha1.Model.InTotoSlsaProvenanceV1 do + @moduledoc """ + + + ## Attributes + + * `_type` (*type:* `String.t`, *default:* `nil`) - InToto spec defined at https://github.com/in-toto/attestation/tree/main/spec#statement + * `predicate` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.SlsaProvenanceV1.t`, *default:* `nil`) - + * `predicateType` (*type:* `String.t`, *default:* `nil`) - + * `subject` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.Subject.t)`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :_type => String.t() | nil, + :predicate => GoogleApi.ContainerAnalysis.V1alpha1.Model.SlsaProvenanceV1.t() | nil, + :predicateType => String.t() | nil, + :subject => list(GoogleApi.ContainerAnalysis.V1alpha1.Model.Subject.t()) | nil + } + + field(:_type) + field(:predicate, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.SlsaProvenanceV1) + field(:predicateType) + field(:subject, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Subject, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoSlsaProvenanceV1 do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoSlsaProvenanceV1.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.InTotoSlsaProvenanceV1 do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/justification.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/justification.ex new file mode 100644 index 0000000000..f51cf91499 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/justification.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1alpha1.Model.Justification do + @moduledoc """ + Justification provides the justification when the state of the assessment if NOT_AFFECTED. + + ## Attributes + + * `details` (*type:* `String.t`, *default:* `nil`) - Additional details on why this justification was chosen. + * `justificationType` (*type:* `String.t`, *default:* `nil`) - The justification type for this vulnerability. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :details => String.t() | nil, + :justificationType => String.t() | nil + } + + field(:details) + field(:justificationType) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Justification do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.Justification.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Justification do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/note.ex index 599d6c4330..e5cba92d65 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/note.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/note.ex @@ -36,12 +36,14 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Note do * `package` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Package.t`, *default:* `nil`) - A note describing a package hosted by various package managers. * `relatedUrl` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.RelatedUrl.t)`, *default:* `nil`) - URLs associated with this note * `sbom` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.DocumentNote.t`, *default:* `nil`) - A note describing a software bill of materials. + * `sbomReference` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceNote.t`, *default:* `nil`) - A note describing a reference to an SBOM. * `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this `Note`. * `spdxFile` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.FileNote.t`, *default:* `nil`) - A note describing an SPDX File. * `spdxPackage` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.PackageInfoNote.t`, *default:* `nil`) - A note describing an SPDX Package. * `spdxRelationship` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.RelationshipNote.t`, *default:* `nil`) - A note describing a relationship between SPDX elements. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this note was last updated. This field can be used as a filter in list requests. * `upgrade` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.UpgradeNote.t`, *default:* `nil`) - A note describing an upgrade. + * `vulnerabilityAssessment` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote.t`, *default:* `nil`) - A note describing a vulnerability assessment. * `vulnerabilityType` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityType.t`, *default:* `nil`) - A package vulnerability type of note. """ @@ -65,6 +67,8 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Note do :package => GoogleApi.ContainerAnalysis.V1alpha1.Model.Package.t() | nil, :relatedUrl => list(GoogleApi.ContainerAnalysis.V1alpha1.Model.RelatedUrl.t()) | nil, :sbom => GoogleApi.ContainerAnalysis.V1alpha1.Model.DocumentNote.t() | nil, + :sbomReference => + GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceNote.t() | nil, :shortDescription => String.t() | nil, :spdxFile => GoogleApi.ContainerAnalysis.V1alpha1.Model.FileNote.t() | nil, :spdxPackage => GoogleApi.ContainerAnalysis.V1alpha1.Model.PackageInfoNote.t() | nil, @@ -72,6 +76,8 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Note do GoogleApi.ContainerAnalysis.V1alpha1.Model.RelationshipNote.t() | nil, :updateTime => DateTime.t() | nil, :upgrade => GoogleApi.ContainerAnalysis.V1alpha1.Model.UpgradeNote.t() | nil, + :vulnerabilityAssessment => + GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote.t() | nil, :vulnerabilityType => GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityType.t() | nil } @@ -92,12 +98,18 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Note do field(:package, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Package) field(:relatedUrl, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.RelatedUrl, type: :list) field(:sbom, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.DocumentNote) + field(:sbomReference, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceNote) field(:shortDescription) field(:spdxFile, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.FileNote) field(:spdxPackage, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.PackageInfoNote) field(:spdxRelationship, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.RelationshipNote) field(:updateTime, as: DateTime) field(:upgrade, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.UpgradeNote) + + field(:vulnerabilityAssessment, + as: GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote + ) + field(:vulnerabilityType, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityType) end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/occurrence.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/occurrence.ex index 01e8c97b8a..f68ef7db34 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/occurrence.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/occurrence.ex @@ -38,6 +38,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Occurrence do * `resource` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Resource.t`, *default:* `nil`) - The resource for which the `Occurrence` applies. * `resourceUrl` (*type:* `String.t`, *default:* `nil`) - The unique URL of the image or the container for which the `Occurrence` applies. For example, https://gcr.io/project/image@sha256:foo This field can be used as a filter in list requests. * `sbom` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.DocumentOccurrence.t`, *default:* `nil`) - Describes a specific software bill of materials document. + * `sbomReference` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceOccurrence.t`, *default:* `nil`) - This represents an SBOM reference occurrence * `spdxFile` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.FileOccurrence.t`, *default:* `nil`) - Describes a specific SPDX File. * `spdxPackage` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.PackageInfoOccurrence.t`, *default:* `nil`) - Describes a specific SPDX Package. * `spdxRelationship` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.RelationshipOccurrence.t`, *default:* `nil`) - Describes a specific relationship between SPDX elements. @@ -68,6 +69,8 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Occurrence do :resource => GoogleApi.ContainerAnalysis.V1alpha1.Model.Resource.t() | nil, :resourceUrl => String.t() | nil, :sbom => GoogleApi.ContainerAnalysis.V1alpha1.Model.DocumentOccurrence.t() | nil, + :sbomReference => + GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceOccurrence.t() | nil, :spdxFile => GoogleApi.ContainerAnalysis.V1alpha1.Model.FileOccurrence.t() | nil, :spdxPackage => GoogleApi.ContainerAnalysis.V1alpha1.Model.PackageInfoOccurrence.t() | nil, @@ -98,6 +101,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Occurrence do field(:resource, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Resource) field(:resourceUrl) field(:sbom, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.DocumentOccurrence) + field(:sbomReference, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceOccurrence) field(:spdxFile, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.FileOccurrence) field(:spdxPackage, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.PackageInfoOccurrence) field(:spdxRelationship, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.RelationshipOccurrence) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/operation.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/operation.ex index cbaea176a3..08312c5001 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/operation.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Operation do * `error` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Status.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 diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/policy.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/policy.ex index 306d1888df..21b94b6b2a 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/policy.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.Policy do @moduledoc """ - An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). ## Attributes diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/product.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/product.ex new file mode 100644 index 0000000000..84660e4300 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/product.ex @@ -0,0 +1,53 @@ +# 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.ContainerAnalysis.V1alpha1.Model.Product do + @moduledoc """ + Product contains information about a product and how to uniquely identify it. + + ## Attributes + + * `id` (*type:* `String.t`, *default:* `nil`) - Token that identifies a product so that it can be referred to from other parts in the document. There is no predefined format as long as it uniquely identifies a group in the context of the current document. + * `identifierHelper` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.IdentifierHelper.t`, *default:* `nil`) - Helps in identifying the underlying product. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the product. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :id => String.t() | nil, + :identifierHelper => + GoogleApi.ContainerAnalysis.V1alpha1.Model.IdentifierHelper.t() | nil, + :name => String.t() | nil + } + + field(:id) + field(:identifierHelper, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.IdentifierHelper) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Product do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.Product.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Product do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/provenance_builder.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/provenance_builder.ex new file mode 100644 index 0000000000..c7353377f2 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/provenance_builder.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.ContainerAnalysis.V1alpha1.Model.ProvenanceBuilder do + @moduledoc """ + + + ## Attributes + + * `builderDependencies` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor.t)`, *default:* `nil`) - + * `id` (*type:* `String.t`, *default:* `nil`) - + * `version` (*type:* `map()`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :builderDependencies => + list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor.t()) | nil, + :id => String.t() | nil, + :version => map() | nil + } + + field(:builderDependencies, + as: GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor, + type: :list + ) + + field(:id) + field(:version, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.ProvenanceBuilder do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.ProvenanceBuilder.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.ProvenanceBuilder do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/publisher.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/publisher.ex new file mode 100644 index 0000000000..22650739a3 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/publisher.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1alpha1.Model.Publisher do + @moduledoc """ + Publisher contains information about the publisher of this Note. + + ## Attributes + + * `issuingAuthority` (*type:* `String.t`, *default:* `nil`) - Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the publisher. Examples: 'Google', 'Google Cloud Platform'. + * `publisherNamespace` (*type:* `String.t`, *default:* `nil`) - The context or namespace. Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party. Example: https://csaf.io + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :issuingAuthority => String.t() | nil, + :name => String.t() | nil, + :publisherNamespace => String.t() | nil + } + + field(:issuingAuthority) + field(:name) + field(:publisherNamespace) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Publisher do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.Publisher.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Publisher do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/remediation.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/remediation.ex new file mode 100644 index 0000000000..8bebe47f59 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/remediation.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1alpha1.Model.Remediation do + @moduledoc """ + Specifies details on how to handle (and presumably, fix) a vulnerability. + + ## Attributes + + * `details` (*type:* `String.t`, *default:* `nil`) - Contains a comprehensive human-readable discussion of the remediation. + * `remediationType` (*type:* `String.t`, *default:* `nil`) - The type of remediation that can be applied. + * `remediationUri` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.URI.t`, *default:* `nil`) - Contains the URL where to obtain the remediation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :details => String.t() | nil, + :remediationType => String.t() | nil, + :remediationUri => GoogleApi.ContainerAnalysis.V1alpha1.Model.URI.t() | nil + } + + field(:details) + field(:remediationType) + field(:remediationUri, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.URI) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Remediation do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.Remediation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.Remediation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/resource_descriptor.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/resource_descriptor.ex new file mode 100644 index 0000000000..e2e8e88e01 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/resource_descriptor.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.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor do + @moduledoc """ + + + ## Attributes + + * `annotations` (*type:* `map()`, *default:* `nil`) - + * `content` (*type:* `String.t`, *default:* `nil`) - + * `digest` (*type:* `map()`, *default:* `nil`) - + * `downloadLocation` (*type:* `String.t`, *default:* `nil`) - + * `mediaType` (*type:* `String.t`, *default:* `nil`) - + * `name` (*type:* `String.t`, *default:* `nil`) - + * `uri` (*type:* `String.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :annotations => map() | nil, + :content => String.t() | nil, + :digest => map() | nil, + :downloadLocation => String.t() | nil, + :mediaType => String.t() | nil, + :name => String.t() | nil, + :uri => String.t() | nil + } + + field(:annotations, type: :map) + field(:content) + field(:digest, type: :map) + field(:downloadLocation) + field(:mediaType) + field(:name) + field(:uri) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/run_details.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/run_details.ex new file mode 100644 index 0000000000..e2b6b104c4 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/run_details.ex @@ -0,0 +1,58 @@ +# 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.ContainerAnalysis.V1alpha1.Model.RunDetails do + @moduledoc """ + + + ## Attributes + + * `builder` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.ProvenanceBuilder.t`, *default:* `nil`) - + * `byproducts` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor.t)`, *default:* `nil`) - + * `metadata` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildMetadata.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :builder => GoogleApi.ContainerAnalysis.V1alpha1.Model.ProvenanceBuilder.t() | nil, + :byproducts => + list(GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor.t()) | nil, + :metadata => GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildMetadata.t() | nil + } + + field(:builder, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.ProvenanceBuilder) + + field(:byproducts, + as: GoogleApi.ContainerAnalysis.V1alpha1.Model.ResourceDescriptor, + type: :list + ) + + field(:metadata, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildMetadata) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.RunDetails do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.RunDetails.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.RunDetails do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_intoto_payload.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_intoto_payload.ex new file mode 100644 index 0000000000..b96558687f --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_intoto_payload.ex @@ -0,0 +1,56 @@ +# 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.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPayload do + @moduledoc """ + The actual payload that contains the SBOM Reference data. The payload follows the intoto statement specification. See https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md for more details. + + ## Attributes + + * `_type` (*type:* `String.t`, *default:* `nil`) - Identifier for the schema of the Statement. + * `predicate` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPredicate.t`, *default:* `nil`) - Additional parameters of the Predicate. Includes the actual data about the SBOM. + * `predicateType` (*type:* `String.t`, *default:* `nil`) - URI identifying the type of the Predicate. + * `subject` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.Subject.t)`, *default:* `nil`) - Set of software artifacts that the attestation applies to. Each element represents a single software artifact. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :_type => String.t() | nil, + :predicate => + GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPredicate.t() | nil, + :predicateType => String.t() | nil, + :subject => list(GoogleApi.ContainerAnalysis.V1alpha1.Model.Subject.t()) | nil + } + + field(:_type) + field(:predicate, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPredicate) + field(:predicateType) + field(:subject, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Subject, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPayload do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPayload.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPayload do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_intoto_predicate.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_intoto_predicate.ex new file mode 100644 index 0000000000..009e501d8b --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_intoto_predicate.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.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPredicate do + @moduledoc """ + A predicate which describes the SBOM being referenced. + + ## Attributes + + * `digest` (*type:* `map()`, *default:* `nil`) - A map of algorithm to digest of the contents of the SBOM. + * `location` (*type:* `String.t`, *default:* `nil`) - The location of the SBOM. + * `mimeType` (*type:* `String.t`, *default:* `nil`) - The mime type of the SBOM. + * `referrerId` (*type:* `String.t`, *default:* `nil`) - The person or system referring this predicate to the consumer. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :digest => map() | nil, + :location => String.t() | nil, + :mimeType => String.t() | nil, + :referrerId => String.t() | nil + } + + field(:digest, type: :map) + field(:location) + field(:mimeType) + field(:referrerId) +end + +defimpl Poison.Decoder, + for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPredicate do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPredicate.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPredicate do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_note.ex new file mode 100644 index 0000000000..86a306fb34 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_note.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1alpha1.Model.SBOMReferenceNote do + @moduledoc """ + The note representing an SBOM reference. + + ## Attributes + + * `format` (*type:* `String.t`, *default:* `nil`) - The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... + * `version` (*type:* `String.t`, *default:* `nil`) - The version of the format that the SBOM takes. E.g. if the format is spdx, the version may be 2.3. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :format => String.t() | nil, + :version => String.t() | nil + } + + field(:format) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceNote do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceNote.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceNote do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_occurrence.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_occurrence.ex new file mode 100644 index 0000000000..c9c2e22ee5 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_reference_occurrence.ex @@ -0,0 +1,55 @@ +# 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.ContainerAnalysis.V1alpha1.Model.SBOMReferenceOccurrence do + @moduledoc """ + The occurrence representing an SBOM reference as applied to a specific resource. The occurrence follows the DSSE specification. See https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more details. + + ## Attributes + + * `payload` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPayload.t`, *default:* `nil`) - The actual payload that contains the SBOM reference data. + * `payloadType` (*type:* `String.t`, *default:* `nil`) - The kind of payload that SbomReferenceIntotoPayload takes. Since it's in the intoto format, this value is expected to be 'application/vnd.in-toto+json'. + * `signatures` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.EnvelopeSignature.t)`, *default:* `nil`) - The signatures over the payload. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :payload => + GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPayload.t() | nil, + :payloadType => String.t() | nil, + :signatures => + list(GoogleApi.ContainerAnalysis.V1alpha1.Model.EnvelopeSignature.t()) | nil + } + + field(:payload, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.SbomReferenceIntotoPayload) + field(:payloadType) + + field(:signatures, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.EnvelopeSignature, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceOccurrence do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceOccurrence.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMReferenceOccurrence do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_status.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_status.ex new file mode 100644 index 0000000000..749aac439b --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/sbom_status.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1alpha1.Model.SBOMStatus do + @moduledoc """ + The status of an SBOM generation. + + ## Attributes + + * `error` (*type:* `String.t`, *default:* `nil`) - Output only. If there was an error generating an SBOM, this will indicate what that error was. + * `sbomState` (*type:* `String.t`, *default:* `nil`) - Output only. The progress of the SBOM generation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :error => String.t() | nil, + :sbomState => String.t() | nil + } + + field(:error) + field(:sbomState) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMStatus do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMStatus.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SBOMStatus do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/slsa_provenance_v1.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/slsa_provenance_v1.ex new file mode 100644 index 0000000000..4a88b48d14 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/slsa_provenance_v1.ex @@ -0,0 +1,50 @@ +# 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.ContainerAnalysis.V1alpha1.Model.SlsaProvenanceV1 do + @moduledoc """ + Keep in sync with schema at https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto Builder renamed to ProvenanceBuilder because of Java conflicts. + + ## Attributes + + * `buildDefinition` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildDefinition.t`, *default:* `nil`) - + * `runDetails` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.RunDetails.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :buildDefinition => + GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildDefinition.t() | nil, + :runDetails => GoogleApi.ContainerAnalysis.V1alpha1.Model.RunDetails.t() | nil + } + + field(:buildDefinition, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.BuildDefinition) + field(:runDetails, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.RunDetails) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SlsaProvenanceV1 do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.SlsaProvenanceV1.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.SlsaProvenanceV1 do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/uri.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/uri.ex new file mode 100644 index 0000000000..a3f19d48f0 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/uri.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1alpha1.Model.URI do + @moduledoc """ + An URI message. + + ## Attributes + + * `label` (*type:* `String.t`, *default:* `nil`) - A label for the URI. + * `uri` (*type:* `String.t`, *default:* `nil`) - The unique resource identifier. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :label => String.t() | nil, + :uri => String.t() | nil + } + + field(:label) + field(:uri) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.URI do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.URI.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.URI do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vex_assessment.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vex_assessment.ex new file mode 100644 index 0000000000..773f677d8b --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vex_assessment.ex @@ -0,0 +1,67 @@ +# 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.ContainerAnalysis.V1alpha1.Model.VexAssessment do + @moduledoc """ + VexAssessment provides all publisher provided Vex information that is related to this vulnerability. + + ## Attributes + + * `cve` (*type:* `String.t`, *default:* `nil`) - Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. + * `impacts` (*type:* `list(String.t)`, *default:* `nil`) - Contains information about the impact of this vulnerability, this will change with time. + * `justification` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Justification.t`, *default:* `nil`) - Justification provides the justification when the state of the assessment if NOT_AFFECTED. + * `noteName` (*type:* `String.t`, *default:* `nil`) - The VulnerabilityAssessment note from which this VexAssessment was generated. This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. + * `relatedUris` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.URI.t)`, *default:* `nil`) - Holds a list of references associated with this vulnerability item and assessment. These uris have additional information about the vulnerability and the assessment itself. E.g. Link to a document which details how this assessment concluded the state of this vulnerability. + * `remediations` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.Remediation.t)`, *default:* `nil`) - Specifies details on how to handle (and presumably, fix) a vulnerability. + * `state` (*type:* `String.t`, *default:* `nil`) - Provides the state of this Vulnerability assessment. + * `vulnerabilityId` (*type:* `String.t`, *default:* `nil`) - The vulnerability identifier for this Assessment. Will hold one of common identifiers e.g. CVE, GHSA etc. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cve => String.t() | nil, + :impacts => list(String.t()) | nil, + :justification => GoogleApi.ContainerAnalysis.V1alpha1.Model.Justification.t() | nil, + :noteName => String.t() | nil, + :relatedUris => list(GoogleApi.ContainerAnalysis.V1alpha1.Model.URI.t()) | nil, + :remediations => list(GoogleApi.ContainerAnalysis.V1alpha1.Model.Remediation.t()) | nil, + :state => String.t() | nil, + :vulnerabilityId => String.t() | nil + } + + field(:cve) + field(:impacts, type: :list) + field(:justification, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Justification) + field(:noteName) + field(:relatedUris, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.URI, type: :list) + field(:remediations, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Remediation, type: :list) + field(:state) + field(:vulnerabilityId) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.VexAssessment do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.VexAssessment.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.VexAssessment do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_assessment_note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_assessment_note.ex new file mode 100644 index 0000000000..0376ca8275 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_assessment_note.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.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote do + @moduledoc """ + A single VulnerabilityAssessmentNote represents one particular product's vulnerability assessment for one CVE. Multiple VulnerabilityAssessmentNotes together form a Vex statement. Please go/sds-vex-example for a sample Vex statement in the CSAF format. + + ## Attributes + + * `assessment` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Assessment.t`, *default:* `nil`) - Represents a vulnerability assessment for the product. + * `languageCode` (*type:* `String.t`, *default:* `nil`) - Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646. + * `longDescription` (*type:* `String.t`, *default:* `nil`) - A detailed description of this Vex. + * `product` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Product.t`, *default:* `nil`) - The product affected by this vex. + * `publisher` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.Publisher.t`, *default:* `nil`) - Publisher details of this Note. + * `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this Vex. + * `title` (*type:* `String.t`, *default:* `nil`) - The title of the note. E.g. `Vex-Debian-11.4` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :assessment => GoogleApi.ContainerAnalysis.V1alpha1.Model.Assessment.t() | nil, + :languageCode => String.t() | nil, + :longDescription => String.t() | nil, + :product => GoogleApi.ContainerAnalysis.V1alpha1.Model.Product.t() | nil, + :publisher => GoogleApi.ContainerAnalysis.V1alpha1.Model.Publisher.t() | nil, + :shortDescription => String.t() | nil, + :title => String.t() | nil + } + + field(:assessment, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Assessment) + field(:languageCode) + field(:longDescription) + field(:product, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Product) + field(:publisher, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Publisher) + field(:shortDescription) + field(:title) +end + +defimpl Poison.Decoder, + for: GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityAssessmentNote do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_details.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_details.ex index 65f4385c71..155437280d 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_details.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_details.ex @@ -22,31 +22,43 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityDetails do ## Attributes * `cvssScore` (*type:* `number()`, *default:* `nil`) - Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0-10 where 0 indicates low severity and 10 indicates high severity. + * `cvssV2` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.CVSS.t`, *default:* `nil`) - The CVSS v2 score of this vulnerability. * `cvssV3` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.CVSS.t`, *default:* `nil`) - The CVSS v3 score of this vulnerability. + * `cvssVersion` (*type:* `String.t`, *default:* `nil`) - Output only. CVSS version used to populate cvss_score and severity. * `effectiveSeverity` (*type:* `String.t`, *default:* `nil`) - The distro assigned severity for this vulnerability when that is available and note provider assigned severity when distro has not yet assigned a severity for this vulnerability. When there are multiple package issues for this vulnerability, they can have different effective severities because some might come from the distro and some might come from installed language packs (e.g. Maven JARs or Go binaries). For this reason, it is advised to use the effective severity on the PackageIssue level, as this field may eventually be deprecated. In the case where multiple PackageIssues have different effective severities, the one set here will be the highest severity of any of the PackageIssues. + * `extraDetails` (*type:* `String.t`, *default:* `nil`) - Occurrence-specific extra details about the vulnerability. * `packageIssue` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.PackageIssue.t)`, *default:* `nil`) - The set of affected locations and their fixes (if available) within the associated resource. * `severity` (*type:* `String.t`, *default:* `nil`) - Output only. The note provider assigned Severity of the vulnerability. * `type` (*type:* `String.t`, *default:* `nil`) - The type of package; whether native or non native(ruby gems, node.js packages etc). This may be deprecated in the future because we can have multiple PackageIssues with different package types. + * `vexAssessment` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.VexAssessment.t`, *default:* `nil`) - VexAssessment provides all publisher provided Vex information that is related to this vulnerability for this resource. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :cvssScore => number() | nil, + :cvssV2 => GoogleApi.ContainerAnalysis.V1alpha1.Model.CVSS.t() | nil, :cvssV3 => GoogleApi.ContainerAnalysis.V1alpha1.Model.CVSS.t() | nil, + :cvssVersion => String.t() | nil, :effectiveSeverity => String.t() | nil, + :extraDetails => String.t() | nil, :packageIssue => list(GoogleApi.ContainerAnalysis.V1alpha1.Model.PackageIssue.t()) | nil, :severity => String.t() | nil, - :type => String.t() | nil + :type => String.t() | nil, + :vexAssessment => GoogleApi.ContainerAnalysis.V1alpha1.Model.VexAssessment.t() | nil } field(:cvssScore) + field(:cvssV2, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.CVSS) field(:cvssV3, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.CVSS) + field(:cvssVersion) field(:effectiveSeverity) + field(:extraDetails) field(:packageIssue, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.PackageIssue, type: :list) field(:severity) field(:type) + field(:vexAssessment, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.VexAssessment) end defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityDetails do diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_type.ex b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_type.ex index 7be394e38a..6ecfffc252 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_type.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1alpha1/model/vulnerability_type.ex @@ -23,6 +23,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityType do * `cvssScore` (*type:* `number()`, *default:* `nil`) - The CVSS score for this Vulnerability. * `cvssV2` (*type:* `GoogleApi.ContainerAnalysis.V1alpha1.Model.CVSS.t`, *default:* `nil`) - The full description of the CVSS for version 2. + * `cvssVersion` (*type:* `String.t`, *default:* `nil`) - CVSS version used to populate cvss_score and severity. * `cwe` (*type:* `list(String.t)`, *default:* `nil`) - A list of CWE for this vulnerability. For details, see: https://cwe.mitre.org/index.html * `details` (*type:* `list(GoogleApi.ContainerAnalysis.V1alpha1.Model.Detail.t)`, *default:* `nil`) - All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in. * `severity` (*type:* `String.t`, *default:* `nil`) - Note provider assigned impact of the vulnerability @@ -33,6 +34,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityType do @type t :: %__MODULE__{ :cvssScore => number() | nil, :cvssV2 => GoogleApi.ContainerAnalysis.V1alpha1.Model.CVSS.t() | nil, + :cvssVersion => String.t() | nil, :cwe => list(String.t()) | nil, :details => list(GoogleApi.ContainerAnalysis.V1alpha1.Model.Detail.t()) | nil, :severity => String.t() | nil @@ -40,6 +42,7 @@ defmodule GoogleApi.ContainerAnalysis.V1alpha1.Model.VulnerabilityType do field(:cvssScore) field(:cvssV2, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.CVSS) + field(:cvssVersion) field(:cwe, type: :list) field(:details, as: GoogleApi.ContainerAnalysis.V1alpha1.Model.Detail, type: :list) field(:severity) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/api/projects.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/api/projects.ex index 2e7ea1b4c3..8afd03722c 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/api/projects.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/api/projects.ex @@ -25,6 +25,751 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Api.Projects do @library_version Mix.Project.config() |> Keyword.get(:version, "") + @doc """ + Gets the specified note. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `notes_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1beta1.Model.Note{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_notes_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.Note.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_notes_get( + connection, + projects_id, + locations_id, + notes_id, + 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(:get) + |> Request.url("/v1beta1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "notesId" => URI.encode(notes_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.ContainerAnalysis.V1beta1.Model.Note{}]) + end + + @doc """ + Lists notes for the specified project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the project to list notes for in the form of `projects/[PROJECT_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `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"). + * `:filter` (*type:* `String.t`) - The filter expression. + * `:pageSize` (*type:* `integer()`) - Number of notes to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. + * `:pageToken` (*type:* `String.t`) - Token to provide to skip to a particular spot in the list. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1beta1.Model.ListNotesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_notes_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.ListNotesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_notes_list( + connection, + projects_id, + locations_id, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta1/projects/{projectsId}/locations/{locationsId}/notes", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &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.ContainerAnalysis.V1beta1.Model.ListNotesResponse{}] + ) + end + + @doc """ + Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the note to list occurrences for in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `notes_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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"). + * `:filter` (*type:* `String.t`) - The filter expression. + * `:pageSize` (*type:* `integer()`) - Number of occurrences to return in the list. + * `:pageToken` (*type:* `String.t`) - Token to provide to skip to a particular spot in the list. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1beta1.Model.ListNoteOccurrencesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_notes_occurrences_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.ListNoteOccurrencesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_notes_occurrences_list( + connection, + projects_id, + locations_id, + notes_id, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}/occurrences", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "notesId" => URI.encode(notes_id, &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.ContainerAnalysis.V1beta1.Model.ListNoteOccurrencesResponse{}] + ) + end + + @doc """ + Gets the specified occurrence. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `occurrences_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1beta1.Model.Occurrence{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_occurrences_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.Occurrence.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_occurrences_get( + connection, + projects_id, + locations_id, + occurrences_id, + 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(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "occurrencesId" => URI.encode(occurrences_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.ContainerAnalysis.V1beta1.Model.Occurrence{}]) + end + + @doc """ + Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `occurrences_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1beta1.Model.Note{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_occurrences_get_notes( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.Note.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_occurrences_get_notes( + connection, + projects_id, + locations_id, + occurrences_id, + 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(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}/notes", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "occurrencesId" => URI.encode(occurrences_id, &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.ContainerAnalysis.V1beta1.Model.Note{}]) + end + + @doc """ + Gets a summary of the number and severity of occurrences. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the project to get a vulnerability summary for in the form of `projects/[PROJECT_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `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"). + * `:filter` (*type:* `String.t`) - The filter expression. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1beta1.Model.VulnerabilityOccurrencesSummary{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_occurrences_get_vulnerability_summary( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.VulnerabilityOccurrencesSummary.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_occurrences_get_vulnerability_summary( + connection, + projects_id, + locations_id, + 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, + :filter => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/occurrences:vulnerabilitySummary", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &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.ContainerAnalysis.V1beta1.Model.VulnerabilityOccurrencesSummary{}] + ) + end + + @doc """ + Lists occurrences for the specified project. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the project to list occurrences for in the form of `projects/[PROJECT_ID]`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `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"). + * `:filter` (*type:* `String.t`) - The filter expression. + * `:pageSize` (*type:* `integer()`) - Number of occurrences to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20. + * `:pageToken` (*type:* `String.t`) - Token to provide to skip to a particular spot in the list. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1beta1.Model.ListOccurrencesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_occurrences_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.ListOccurrencesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_occurrences_list( + connection, + projects_id, + locations_id, + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1beta1/projects/{projectsId}/locations/{locationsId}/occurrences", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &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.ContainerAnalysis.V1beta1.Model.ListOccurrencesResponse{}] + ) + end + + @doc """ + Generates an SBOM and other dependency information for the given resource. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the resource in the form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `resources_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1beta1.Model.ExportSBOMRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1beta1.Model.ExportSBOMResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_resources_export_sbom( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.ExportSBOMResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_resources_export_sbom( + connection, + projects_id, + locations_id, + resources_id, + 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(:post) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/resources/{resourcesId}:exportSBOM", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "resourcesId" => URI.encode(resources_id, &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.ContainerAnalysis.V1beta1.Model.ExportSBOMResponse{}] + ) + end + + @doc """ + Gets a summary of the packages within a given resource. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the resource to get a packages summary for in the form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `resources_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1beta1.Model.GeneratePackagesSummaryRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1beta1.Model.PackagesSummaryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_locations_resources_generate_packages_summary( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.PackagesSummaryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_locations_resources_generate_packages_summary( + connection, + projects_id, + locations_id, + resources_id, + 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(:post) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/resources/{resourcesId}:generatePackagesSummary", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "resourcesId" => URI.encode(resources_id, &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.ContainerAnalysis.V1beta1.Model.PackagesSummaryResponse{}] + ) + end + @doc """ Creates new notes in batch. @@ -1621,4 +2366,163 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Api.Projects do opts ++ [struct: %GoogleApi.ContainerAnalysis.V1beta1.Model.TestIamPermissionsResponse{}] ) end + + @doc """ + Generates an SBOM and other dependency information for the given resource. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the resource in the form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. + * `resources_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1beta1.Model.ExportSBOMRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1beta1.Model.ExportSBOMResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_resources_export_sbom( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.ExportSBOMResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_resources_export_sbom( + connection, + projects_id, + resources_id, + 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(:post) + |> Request.url("/v1beta1/projects/{projectsId}/resources/{resourcesId}:exportSBOM", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "resourcesId" => URI.encode(resources_id, &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.ContainerAnalysis.V1beta1.Model.ExportSBOMResponse{}] + ) + end + + @doc """ + Gets a summary of the packages within a given resource. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the resource to get a packages summary for in the form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. + * `resources_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `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.ContainerAnalysis.V1beta1.Model.GeneratePackagesSummaryRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ContainerAnalysis.V1beta1.Model.PackagesSummaryResponse{}}` on success + * `{:error, info}` on failure + """ + @spec containeranalysis_projects_resources_generate_packages_summary( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ContainerAnalysis.V1beta1.Model.PackagesSummaryResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def containeranalysis_projects_resources_generate_packages_summary( + connection, + projects_id, + resources_id, + 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(:post) + |> Request.url( + "/v1beta1/projects/{projectsId}/resources/{resourcesId}:generatePackagesSummary", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "resourcesId" => URI.encode(resources_id, &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.ContainerAnalysis.V1beta1.Model.PackagesSummaryResponse{}] + ) + end end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/metadata.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/metadata.ex index 07c3b1af1b..92a70e164b 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/metadata.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1 do API client metadata for GoogleApi.ContainerAnalysis.V1beta1. """ - @discovery_revision "20221112" + @discovery_revision "20240301" def discovery_revision(), do: @discovery_revision end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/assessment.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/assessment.ex new file mode 100644 index 0000000000..d42a8990e8 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/assessment.ex @@ -0,0 +1,70 @@ +# 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.ContainerAnalysis.V1beta1.Model.Assessment do + @moduledoc """ + Assessment provides all information that is related to a single vulnerability for this product. + + ## Attributes + + * `cve` (*type:* `String.t`, *default:* `nil`) - Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. Deprecated: Use vulnerability_id instead to denote CVEs. + * `impacts` (*type:* `list(String.t)`, *default:* `nil`) - Contains information about the impact of this vulnerability, this will change with time. + * `justification` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Justification.t`, *default:* `nil`) - Justification provides the justification when the state of the assessment if NOT_AFFECTED. + * `longDescription` (*type:* `String.t`, *default:* `nil`) - A detailed description of this Vex. + * `relatedUris` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t)`, *default:* `nil`) - Holds a list of references associated with this vulnerability item and assessment. These uris have additional information about the vulnerability and the assessment itself. E.g. Link to a document which details how this assessment concluded the state of this vulnerability. + * `remediations` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.Remediation.t)`, *default:* `nil`) - Specifies details on how to handle (and presumably, fix) a vulnerability. + * `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this Vex. + * `state` (*type:* `String.t`, *default:* `nil`) - Provides the state of this Vulnerability assessment. + * `vulnerabilityId` (*type:* `String.t`, *default:* `nil`) - The vulnerability identifier for this Assessment. Will hold one of common identifiers e.g. CVE, GHSA etc. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cve => String.t() | nil, + :impacts => list(String.t()) | nil, + :justification => GoogleApi.ContainerAnalysis.V1beta1.Model.Justification.t() | nil, + :longDescription => String.t() | nil, + :relatedUris => list(GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t()) | nil, + :remediations => list(GoogleApi.ContainerAnalysis.V1beta1.Model.Remediation.t()) | nil, + :shortDescription => String.t() | nil, + :state => String.t() | nil, + :vulnerabilityId => String.t() | nil + } + + field(:cve) + field(:impacts, type: :list) + field(:justification, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Justification) + field(:longDescription) + field(:relatedUris, as: GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl, type: :list) + field(:remediations, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Remediation, type: :list) + field(:shortDescription) + field(:state) + field(:vulnerabilityId) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Assessment do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.Assessment.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Assessment do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/binding.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/binding.ex index 59ad73a5b8..2a048d1018 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/binding.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/binding.ex @@ -22,8 +22,8 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Expr.t`, *default:* `nil`) - The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. - * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). """ use GoogleApi.Gax.ModelBase diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/build_definition.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/build_definition.ex new file mode 100644 index 0000000000..62690cbece --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/build_definition.ex @@ -0,0 +1,60 @@ +# 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.ContainerAnalysis.V1beta1.Model.BuildDefinition do + @moduledoc """ + + + ## Attributes + + * `buildType` (*type:* `String.t`, *default:* `nil`) - + * `externalParameters` (*type:* `map()`, *default:* `nil`) - + * `internalParameters` (*type:* `map()`, *default:* `nil`) - + * `resolvedDependencies` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor.t)`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :buildType => String.t() | nil, + :externalParameters => map() | nil, + :internalParameters => map() | nil, + :resolvedDependencies => + list(GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor.t()) | nil + } + + field(:buildType) + field(:externalParameters, type: :map) + field(:internalParameters, type: :map) + + field(:resolvedDependencies, + as: GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.BuildDefinition do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.BuildDefinition.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.BuildDefinition do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/build_metadata.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/build_metadata.ex new file mode 100644 index 0000000000..a578d99704 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/build_metadata.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1beta1.Model.BuildMetadata do + @moduledoc """ + + + ## Attributes + + * `finishedOn` (*type:* `DateTime.t`, *default:* `nil`) - + * `invocationId` (*type:* `String.t`, *default:* `nil`) - + * `startedOn` (*type:* `DateTime.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :finishedOn => DateTime.t() | nil, + :invocationId => String.t() | nil, + :startedOn => DateTime.t() | nil + } + + field(:finishedOn, as: DateTime) + field(:invocationId) + field(:startedOn, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.BuildMetadata do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.BuildMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.BuildMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/build_step.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/build_step.ex index 859d6c574d..ada2c31953 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/build_step.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/build_step.ex @@ -17,13 +17,14 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.BuildStep do @moduledoc """ - A step in the build pipeline. Next ID: 20 + A step in the build pipeline. Next ID: 21 ## Attributes * `allowExitCodes` (*type:* `list(integer())`, *default:* `nil`) - Allow this build step to fail without failing the entire build if and only if the exit code is one of the specified codes. If allow_failure is also specified, this field will take precedence. * `allowFailure` (*type:* `boolean()`, *default:* `nil`) - Allow this build step to fail without failing the entire build. If false, the entire build will fail if this step fails. Otherwise, the build will succeed, but this step will still have a failure status. Error information will be reported in the failure_detail field. * `args` (*type:* `list(String.t)`, *default:* `nil`) - A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. + * `automapSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to include built-in and custom substitutions as env variables for this build step. This option will override the global option in BuildOption. * `dir` (*type:* `String.t`, *default:* `nil`) - Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. * `entrypoint` (*type:* `String.t`, *default:* `nil`) - Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used. * `env` (*type:* `list(String.t)`, *default:* `nil`) - A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". @@ -46,6 +47,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.BuildStep do :allowExitCodes => list(integer()) | nil, :allowFailure => boolean() | nil, :args => list(String.t()) | nil, + :automapSubstitutions => boolean() | nil, :dir => String.t() | nil, :entrypoint => String.t() | nil, :env => list(String.t()) | nil, @@ -65,6 +67,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.BuildStep do field(:allowExitCodes, type: :list) field(:allowFailure) field(:args, type: :list) + field(:automapSubstitutions) field(:dir) field(:entrypoint) field(:env, type: :list) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex index 5512a52551..72d7445bca 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts.ex @@ -23,6 +23,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto * `images` (*type:* `list(String.t)`, *default:* `nil`) - A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE. * `mavenArtifacts` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact.t)`, *default:* `nil`) - A list of Maven artifacts to be uploaded to Artifact Registry upon successful completion of all build steps. Artifacts in the workspace matching specified paths globs will be uploaded to the specified Artifact Registry repository using the builder service account's credentials. If any artifacts fail to be pushed, the build is marked FAILURE. + * `npmPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage.t)`, *default:* `nil`) - A list of npm packages to be uploaded to Artifact Registry upon successful completion of all build steps. Npm packages in the specified paths will be uploaded to the specified Artifact Registry repository using the builder service account's credentials. If any packages fail to be pushed, the build is marked FAILURE. * `objects` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects.t`, *default:* `nil`) - A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. * `pythonPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsPythonPackage.t)`, *default:* `nil`) - A list of Python packages to be uploaded to Artifact Registry upon successful completion of all build steps. The build service account credentials will be used to perform the upload. If any objects fail to be pushed, the build is marked FAILURE. """ @@ -36,6 +37,11 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsMavenArtifact.t() ) | nil, + :npmPackages => + list( + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage.t() + ) + | nil, :objects => GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects.t() | nil, @@ -54,6 +60,12 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto type: :list ) + field(:npmPackages, + as: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage, + type: :list + ) + field(:objects, as: GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts_npm_package.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts_npm_package.ex new file mode 100644 index 0000000000..4075c81dfd --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_artifacts_npm_package.ex @@ -0,0 +1,56 @@ +# 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.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage do + @moduledoc """ + Npm package to upload to Artifact Registry upon successful completion of all build steps. + + ## Attributes + + * `packagePath` (*type:* `String.t`, *default:* `nil`) - Path to the package.json. e.g. workspace/path/to/package + * `repository` (*type:* `String.t`, *default:* `nil`) - Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :packagePath => String.t() | nil, + :repository => String.t() | nil + } + + field(:packagePath) + field(:repository) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsNpmPackage do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex index 20118a010a..301d2a1575 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build.ex @@ -31,7 +31,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto * `id` (*type:* `String.t`, *default:* `nil`) - Output only. Unique identifier of the build. * `images` (*type:* `list(String.t)`, *default:* `nil`) - A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`. * `logUrl` (*type:* `String.t`, *default:* `nil`) - Output only. URL to logs for this build in Google Cloud Console. - * `logsBucket` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + * `logsBucket` (*type:* `String.t`, *default:* `nil`) - Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The 'Build' name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service. * `options` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions.t`, *default:* `nil`) - Special options for this build. * `projectId` (*type:* `String.t`, *default:* `nil`) - Output only. ID of the project. @@ -47,7 +47,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto * `steps` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep.t)`, *default:* `nil`) - Required. The operations to be performed on the workspace. * `substitutions` (*type:* `map()`, *default:* `nil`) - Substitutions data for `Build` resource. * `tags` (*type:* `list(String.t)`, *default:* `nil`) - Tags for annotation of a `Build`. These are not docker tags. - * `timeout` (*type:* `String.t`, *default:* `nil`) - Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes. + * `timeout` (*type:* `String.t`, *default:* `nil`) - Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes. * `timing` (*type:* `%{optional(String.t) => GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t}`, *default:* `nil`) - Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps. * PUSH: time to push all artifacts including docker images and non docker artifacts. * FETCHSOURCE: time to fetch source. * SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included. * `warnings` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning.t)`, *default:* `nil`) - Output only. Non-fatal problems encountered during the execution of the build. """ diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex index 1a9bc5448f..847f25b70c 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build_options.ex @@ -21,10 +21,12 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto ## Attributes + * `automapSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to include built-in and custom substitutions as env variables for all build steps. + * `defaultLogsBucketBehavior` (*type:* `String.t`, *default:* `nil`) - Optional. Option to specify how default logs buckets are setup. * `diskSizeGb` (*type:* `String.t`, *default:* `nil`) - Requested disk size for the VM that runs the build. Note that this is *NOT* "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 2000GB; builds that request more than the maximum are rejected with an error. * `dynamicSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file. * `env` (*type:* `list(String.t)`, *default:* `nil`) - A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". - * `logStreamingOption` (*type:* `String.t`, *default:* `nil`) - Option to define build log streaming behavior to Google Cloud Storage. + * `logStreamingOption` (*type:* `String.t`, *default:* `nil`) - Option to define build log streaming behavior to Cloud Storage. * `logging` (*type:* `String.t`, *default:* `nil`) - Option to specify the logging mode, which determines if and where build logs are stored. * `machineType` (*type:* `String.t`, *default:* `nil`) - Compute Engine machine type on which to run the build. * `pool` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption.t`, *default:* `nil`) - Optional. Specification for execution on a `WorkerPool`. See [running builds in a private pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) for more information. @@ -39,6 +41,8 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :automapSubstitutions => boolean() | nil, + :defaultLogsBucketBehavior => String.t() | nil, :diskSizeGb => String.t() | nil, :dynamicSubstitutions => boolean() | nil, :env => list(String.t()) | nil, @@ -60,6 +64,8 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto :workerPool => String.t() | nil } + field(:automapSubstitutions) + field(:defaultLogsBucketBehavior) field(:diskSizeGb) field(:dynamicSubstitutions) field(:env, type: :list) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex index ecfd17b403..2e283cf76c 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_build_step.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto * `allowExitCodes` (*type:* `list(integer())`, *default:* `nil`) - Allow this build step to fail without failing the entire build if and only if the exit code is one of the specified codes. If allow_failure is also specified, this field will take precedence. * `allowFailure` (*type:* `boolean()`, *default:* `nil`) - Allow this build step to fail without failing the entire build. If false, the entire build will fail if this step fails. Otherwise, the build will succeed, but this step will still have a failure status. Error information will be reported in the failure_detail field. * `args` (*type:* `list(String.t)`, *default:* `nil`) - A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. + * `automapSubstitutions` (*type:* `boolean()`, *default:* `nil`) - Option to include built-in and custom substitutions as env variables for this build step. This option will override the global option in BuildOption. * `dir` (*type:* `String.t`, *default:* `nil`) - Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. * `entrypoint` (*type:* `String.t`, *default:* `nil`) - Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used. * `env` (*type:* `list(String.t)`, *default:* `nil`) - A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". @@ -46,6 +47,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto :allowExitCodes => list(integer()) | nil, :allowFailure => boolean() | nil, :args => list(String.t()) | nil, + :automapSubstitutions => boolean() | nil, :dir => String.t() | nil, :entrypoint => String.t() | nil, :env => list(String.t()) | nil, @@ -73,6 +75,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto field(:allowExitCodes, type: :list) field(:allowFailure) field(:args, type: :list) + field(:automapSubstitutions) field(:dir) field(:entrypoint) field(:env, type: :list) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_connected_repository.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_connected_repository.ex new file mode 100644 index 0000000000..21f4413331 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_connected_repository.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.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository do + @moduledoc """ + Location of the source in a 2nd-gen Google Cloud Build repository resource. + + ## Attributes + + * `dir` (*type:* `String.t`, *default:* `nil`) - Directory, relative to the source root, in which to run the build. + * `repository` (*type:* `String.t`, *default:* `nil`) - Required. Name of the Google Cloud Build repository, formatted as `projects/*/locations/*/connections/*/repositories/*`. + * `revision` (*type:* `String.t`, *default:* `nil`) - The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dir => String.t() | nil, + :repository => String.t() | nil, + :revision => String.t() | nil + } + + field(:dir) + field(:repository) + field(:revision) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_git_source.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_git_source.ex new file mode 100644 index 0000000000..5fcfb8f2f4 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_git_source.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.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource do + @moduledoc """ + Location of the source in any accessible Git repository. + + ## Attributes + + * `dir` (*type:* `String.t`, *default:* `nil`) - Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. + * `revision` (*type:* `String.t`, *default:* `nil`) - The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses `git fetch` to fetch the revision from the Git repository; therefore make sure that the string you provide for `revision` is parsable by the command. For information on string values accepted by `git fetch`, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on `git fetch`, see https://git-scm.com/docs/git-fetch. + * `url` (*type:* `String.t`, *default:* `nil`) - Location of the Git repo to build. This will be used as a `git remote`, see https://git-scm.com/docs/git-remote. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dir => String.t() | nil, + :revision => String.t() | nil, + :url => String.t() | nil + } + + field(:dir) + field(:revision) + field(:url) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex index 12f2546bc5..b0b5ea42b4 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_results.ex @@ -24,9 +24,10 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto * `artifactManifest` (*type:* `String.t`, *default:* `nil`) - Path to the artifact manifest for non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage. * `artifactTiming` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t`, *default:* `nil`) - Time to push all non-container artifacts to Cloud Storage. * `buildStepImages` (*type:* `list(String.t)`, *default:* `nil`) - List of build step digests, in the order corresponding to build step indices. - * `buildStepOutputs` (*type:* `list(String.t)`, *default:* `nil`) - List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored. + * `buildStepOutputs` (*type:* `list(String.t)`, *default:* `nil`) - List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data is stored. * `images` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage.t)`, *default:* `nil`) - Container images that were built as a part of the build. * `mavenArtifacts` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact.t)`, *default:* `nil`) - Maven artifacts uploaded to Artifact Registry at the end of the build. + * `npmPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage.t)`, *default:* `nil`) - Npm packages uploaded to Artifact Registry at the end of the build. * `numArtifacts` (*type:* `String.t`, *default:* `nil`) - Number of non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage. * `pythonPackages` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedPythonPackage.t)`, *default:* `nil`) - Python artifacts uploaded to Artifact Registry at the end of the build. """ @@ -50,6 +51,11 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedMavenArtifact.t() ) | nil, + :npmPackages => + list( + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage.t() + ) + | nil, :numArtifacts => String.t() | nil, :pythonPackages => list( @@ -80,6 +86,12 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto type: :list ) + field(:npmPackages, + as: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage, + type: :list + ) + field(:numArtifacts) field(:pythonPackages, diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex index de4920ee8a..804e8b8bfc 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_source.ex @@ -21,14 +21,22 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto ## Attributes + * `connectedRepository` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t`, *default:* `nil`) - Optional. If provided, get the source from this 2nd-gen Google Cloud Build repository resource. + * `gitSource` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t`, *default:* `nil`) - If provided, get the source from this Git repository. * `repoSource` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t`, *default:* `nil`) - If provided, get the source from this location in a Cloud Source Repository. - * `storageSource` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource.t`, *default:* `nil`) - If provided, get the source from this location in Google Cloud Storage. - * `storageSourceManifest` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest.t`, *default:* `nil`) - If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). + * `storageSource` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource.t`, *default:* `nil`) - If provided, get the source from this location in Cloud Storage. + * `storageSourceManifest` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest.t`, *default:* `nil`) - If provided, get the source from this manifest in Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :connectedRepository => + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t() + | nil, + :gitSource => + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t() + | nil, :repoSource => GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t() | nil, @@ -40,6 +48,16 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto | nil } + field(:connectedRepository, + as: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository + ) + + field(:gitSource, + as: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource + ) + field(:repoSource, as: GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex index 9ac06acbe7..ecffee97d6 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_source_provenance.ex @@ -22,6 +22,8 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto ## Attributes * `fileHashes` (*type:* `%{optional(String.t) => GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t}`, *default:* `nil`) - Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file. + * `resolvedConnectedRepository` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t`, *default:* `nil`) - Output only. A copy of the build's `source.connected_repository`, if exists, with any revisions resolved. + * `resolvedGitSource` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t`, *default:* `nil`) - Output only. A copy of the build's `source.git_source`, if exists, with any revisions resolved. * `resolvedRepoSource` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t`, *default:* `nil`) - A copy of the build's `source.repo_source`, if exists, with any revisions resolved. * `resolvedStorageSource` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource.t`, *default:* `nil`) - A copy of the build's `source.storage_source`, if exists, with any generations resolved. * `resolvedStorageSourceManifest` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest.t`, *default:* `nil`) - A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview. @@ -36,6 +38,12 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t() } | nil, + :resolvedConnectedRepository => + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository.t() + | nil, + :resolvedGitSource => + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource.t() + | nil, :resolvedRepoSource => GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource.t() | nil, @@ -53,6 +61,16 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto type: :map ) + field(:resolvedConnectedRepository, + as: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1ConnectedRepository + ) + + field(:resolvedGitSource, + as: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1GitSource + ) + field(:resolvedRepoSource, as: GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex index 5945397bc2..49cea0cdd3 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source.ex @@ -17,13 +17,14 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource do @moduledoc """ - Location of the source in an archive file in Google Cloud Storage. + Location of the source in an archive file in Cloud Storage. ## Attributes - * `bucket` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * `generation` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. - * `object` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage object containing the source. This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to build. + * `bucket` (*type:* `String.t`, *default:* `nil`) - Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * `generation` (*type:* `String.t`, *default:* `nil`) - Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + * `object` (*type:* `String.t`, *default:* `nil`) - Cloud Storage object containing the source. This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to build. + * `sourceFetcher` (*type:* `String.t`, *default:* `nil`) - Optional. Option to specify the tool to fetch the source file for the build. """ use GoogleApi.Gax.ModelBase @@ -31,12 +32,14 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevto @type t :: %__MODULE__{ :bucket => String.t() | nil, :generation => String.t() | nil, - :object => String.t() | nil + :object => String.t() | nil, + :sourceFetcher => String.t() | nil } field(:bucket) field(:generation) field(:object) + field(:sourceFetcher) end defimpl Poison.Decoder, diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex index 6b8b1d78b7..01f2539494 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_storage_source_manifest.ex @@ -17,13 +17,13 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest do @moduledoc """ - Location of the source manifest in Google Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). + Location of the source manifest in Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). ## Attributes - * `bucket` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * `generation` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. - * `object` (*type:* `String.t`, *default:* `nil`) - Google Cloud Storage object containing the source manifest. This object must be a JSON file. + * `bucket` (*type:* `String.t`, *default:* `nil`) - Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * `generation` (*type:* `String.t`, *default:* `nil`) - Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + * `object` (*type:* `String.t`, *default:* `nil`) - Cloud Storage object containing the source manifest. This object must be a JSON file. """ use GoogleApi.Gax.ModelBase diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_uploaded_npm_package.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_uploaded_npm_package.ex new file mode 100644 index 0000000000..2aee9a8c0d --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/containeranalysis_google_devtools_cloudbuild_v1_uploaded_npm_package.ex @@ -0,0 +1,71 @@ +# 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.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage do + @moduledoc """ + An npm package uploaded to Artifact Registry using the NpmPackage directive. + + ## Attributes + + * `fileHashes` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t`, *default:* `nil`) - Hash types and values of the npm package. + * `pushTiming` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t`, *default:* `nil`) - Output only. Stores timing information for pushing the specified artifact. + * `uri` (*type:* `String.t`, *default:* `nil`) - URI of the uploaded npm package. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fileHashes => + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes.t() + | nil, + :pushTiming => + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan.t() + | nil, + :uri => String.t() | nil + } + + field(:fileHashes, + as: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes + ) + + field(:pushTiming, + as: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan + ) + + field(:uri) +end + +defimpl Poison.Decoder, + for: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.ContainerAnalysis.V1beta1.Model.ContaineranalysisGoogleDevtoolsCloudbuildV1UploadedNpmPackage do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/discovered.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/discovered.ex index a6f8b15488..797dc31a08 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/discovered.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/discovered.ex @@ -27,6 +27,8 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Discovered do * `analysisStatusError` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Status.t`, *default:* `nil`) - When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API. * `continuousAnalysis` (*type:* `String.t`, *default:* `nil`) - Whether the resource is continuously analyzed. * `lastAnalysisTime` (*type:* `DateTime.t`, *default:* `nil`) - The last time continuous analysis was done for this resource. Deprecated, do not use. + * `lastScanTime` (*type:* `DateTime.t`, *default:* `nil`) - The last time this resource was scanned. + * `sbomStatus` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMStatus.t`, *default:* `nil`) - The status of an SBOM generation. """ use GoogleApi.Gax.ModelBase @@ -38,7 +40,9 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Discovered do :analysisStatus => String.t() | nil, :analysisStatusError => GoogleApi.ContainerAnalysis.V1beta1.Model.Status.t() | nil, :continuousAnalysis => String.t() | nil, - :lastAnalysisTime => DateTime.t() | nil + :lastAnalysisTime => DateTime.t() | nil, + :lastScanTime => DateTime.t() | nil, + :sbomStatus => GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMStatus.t() | nil } field(:analysisCompleted, as: GoogleApi.ContainerAnalysis.V1beta1.Model.AnalysisCompleted) @@ -47,6 +51,8 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Discovered do field(:analysisStatusError, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Status) field(:continuousAnalysis) field(:lastAnalysisTime, as: DateTime) + field(:lastScanTime, as: DateTime) + field(:sbomStatus, as: GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMStatus) end defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Discovered do diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/document_note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/document_note.ex index f98a39599d..bccd047485 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/document_note.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/document_note.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentNote do @moduledoc """ - DocumentNote represents an SPDX Document Creation Information section: https://spdx.github.io/spdx-spec/v2.3/document-creation-information/ + DocumentNote represents an SPDX Document Creation Information section: https://spdx.github.io/spdx-spec/2-document-creation-information/ ## Attributes diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/document_occurrence.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/document_occurrence.ex index c0f302b5b5..01a6e7fc94 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/document_occurrence.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/document_occurrence.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentOccurrence do @moduledoc """ - DocumentOccurrence represents an SPDX Document Creation Information section: https://spdx.github.io/spdx-spec/v2.3/document-creation-information/ + DocumentOccurrence represents an SPDX Document Creation Information section: https://spdx.github.io/spdx-spec/2-document-creation-information/ ## Attributes diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/export_sbom_request.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/export_sbom_request.ex new file mode 100644 index 0000000000..0aa0bae767 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/export_sbom_request.ex @@ -0,0 +1,41 @@ +# 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.ContainerAnalysis.V1beta1.Model.ExportSBOMRequest do + @moduledoc """ + The request to a call of ExportSBOM + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.ExportSBOMRequest do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.ExportSBOMRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.ExportSBOMRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/export_sbom_response.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/export_sbom_response.ex new file mode 100644 index 0000000000..c516032793 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/export_sbom_response.ex @@ -0,0 +1,46 @@ +# 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.ContainerAnalysis.V1beta1.Model.ExportSBOMResponse do + @moduledoc """ + The response from a call to ExportSBOM + + ## Attributes + + * `discoveryOccurrenceId` (*type:* `String.t`, *default:* `nil`) - The name of the discovery occurrence in the form "projects/{project_id}/occurrences/{OCCURRENCE_ID} It can be used to track the progression of the SBOM export. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :discoveryOccurrenceId => String.t() | nil + } + + field(:discoveryOccurrenceId) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.ExportSBOMResponse do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.ExportSBOMResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.ExportSBOMResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/generate_packages_summary_request.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/generate_packages_summary_request.ex new file mode 100644 index 0000000000..3eb8d848a2 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/generate_packages_summary_request.ex @@ -0,0 +1,46 @@ +# 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.ContainerAnalysis.V1beta1.Model.GeneratePackagesSummaryRequest do + @moduledoc """ + GeneratePackagesSummaryRequest is the request body for the GeneratePackagesSummary API method. It just takes a single name argument, referring to the resource. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: GoogleApi.ContainerAnalysis.V1beta1.Model.GeneratePackagesSummaryRequest do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.GeneratePackagesSummaryRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.ContainerAnalysis.V1beta1.Model.GeneratePackagesSummaryRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/grafeas_v1beta1_build_details.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/grafeas_v1beta1_build_details.ex index 68704b4d18..28ed6683a9 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/grafeas_v1beta1_build_details.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/grafeas_v1beta1_build_details.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.GrafeasV1beta1BuildDetails d ## Attributes + * `inTotoSlsaProvenanceV1` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.InTotoSlsaProvenanceV1.t`, *default:* `nil`) - * `provenance` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.BuildProvenance.t`, *default:* `nil`) - Required. The actual provenance for the build. * `provenanceBytes` (*type:* `String.t`, *default:* `nil`) - Serialized JSON representation of the provenance, used in generating the build signature in the corresponding build note. After verifying the signature, `provenance_bytes` can be unmarshalled and compared to the provenance to confirm that it is unchanged. A base64-encoded string representation of the provenance bytes is used for the signature in order to interoperate with openssl which expects this format for signature verification. The serialized form is captured both to avoid ambiguity in how the provenance is marshalled to json as well to prevent incompatibilities with future changes. """ @@ -28,10 +29,16 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.GrafeasV1beta1BuildDetails d use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :inTotoSlsaProvenanceV1 => + GoogleApi.ContainerAnalysis.V1beta1.Model.InTotoSlsaProvenanceV1.t() | nil, :provenance => GoogleApi.ContainerAnalysis.V1beta1.Model.BuildProvenance.t() | nil, :provenanceBytes => String.t() | nil } + field(:inTotoSlsaProvenanceV1, + as: GoogleApi.ContainerAnalysis.V1beta1.Model.InTotoSlsaProvenanceV1 + ) + field(:provenance, as: GoogleApi.ContainerAnalysis.V1beta1.Model.BuildProvenance) field(:provenanceBytes) end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/grafeas_v1beta1_vulnerability_details.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/grafeas_v1beta1_vulnerability_details.ex index fc8903097d..f4709a2c17 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/grafeas_v1beta1_vulnerability_details.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/grafeas_v1beta1_vulnerability_details.ex @@ -22,39 +22,51 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.GrafeasV1beta1VulnerabilityD ## Attributes * `cvssScore` (*type:* `number()`, *default:* `nil`) - Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0-10 where 0 indicates low severity and 10 indicates high severity. + * `cvssV2` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.CVSS.t`, *default:* `nil`) - The cvss v2 score for the vulnerability. + * `cvssV3` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.CVSS.t`, *default:* `nil`) - The cvss v3 score for the vulnerability. * `cvssVersion` (*type:* `String.t`, *default:* `nil`) - Output only. CVSS version used to populate cvss_score and severity. * `effectiveSeverity` (*type:* `String.t`, *default:* `nil`) - The distro assigned severity for this vulnerability when it is available, and note provider assigned severity when distro has not yet assigned a severity for this vulnerability. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues. + * `extraDetails` (*type:* `String.t`, *default:* `nil`) - Occurrence-specific extra details about the vulnerability. * `longDescription` (*type:* `String.t`, *default:* `nil`) - Output only. A detailed description of this vulnerability. * `packageIssue` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.PackageIssue.t)`, *default:* `nil`) - Required. The set of affected locations and their fixes (if available) within the associated resource. * `relatedUrls` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t)`, *default:* `nil`) - Output only. URLs related to this vulnerability. * `severity` (*type:* `String.t`, *default:* `nil`) - Output only. The note provider assigned Severity of the vulnerability. * `shortDescription` (*type:* `String.t`, *default:* `nil`) - Output only. A one sentence description of this vulnerability. * `type` (*type:* `String.t`, *default:* `nil`) - The type of package; whether native or non native(ruby gems, node.js packages etc) + * `vexAssessment` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.VexAssessment.t`, *default:* `nil`) - """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :cvssScore => number() | nil, + :cvssV2 => GoogleApi.ContainerAnalysis.V1beta1.Model.CVSS.t() | nil, + :cvssV3 => GoogleApi.ContainerAnalysis.V1beta1.Model.CVSS.t() | nil, :cvssVersion => String.t() | nil, :effectiveSeverity => String.t() | nil, + :extraDetails => String.t() | nil, :longDescription => String.t() | nil, :packageIssue => list(GoogleApi.ContainerAnalysis.V1beta1.Model.PackageIssue.t()) | nil, :relatedUrls => list(GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t()) | nil, :severity => String.t() | nil, :shortDescription => String.t() | nil, - :type => String.t() | nil + :type => String.t() | nil, + :vexAssessment => GoogleApi.ContainerAnalysis.V1beta1.Model.VexAssessment.t() | nil } field(:cvssScore) + field(:cvssV2, as: GoogleApi.ContainerAnalysis.V1beta1.Model.CVSS) + field(:cvssV3, as: GoogleApi.ContainerAnalysis.V1beta1.Model.CVSS) field(:cvssVersion) field(:effectiveSeverity) + field(:extraDetails) field(:longDescription) field(:packageIssue, as: GoogleApi.ContainerAnalysis.V1beta1.Model.PackageIssue, type: :list) field(:relatedUrls, as: GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl, type: :list) field(:severity) field(:shortDescription) field(:type) + field(:vexAssessment, as: GoogleApi.ContainerAnalysis.V1beta1.Model.VexAssessment) end defimpl Poison.Decoder, diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/in_toto_slsa_provenance_v1.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/in_toto_slsa_provenance_v1.ex new file mode 100644 index 0000000000..601812b5aa --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/in_toto_slsa_provenance_v1.ex @@ -0,0 +1,55 @@ +# 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.ContainerAnalysis.V1beta1.Model.InTotoSlsaProvenanceV1 do + @moduledoc """ + + + ## Attributes + + * `_type` (*type:* `String.t`, *default:* `nil`) - InToto spec defined at https://github.com/in-toto/attestation/tree/main/spec#statement + * `predicate` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.SlsaProvenanceV1.t`, *default:* `nil`) - + * `predicateType` (*type:* `String.t`, *default:* `nil`) - + * `subject` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.Subject.t)`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :_type => String.t() | nil, + :predicate => GoogleApi.ContainerAnalysis.V1beta1.Model.SlsaProvenanceV1.t() | nil, + :predicateType => String.t() | nil, + :subject => list(GoogleApi.ContainerAnalysis.V1beta1.Model.Subject.t()) | nil + } + + field(:_type) + field(:predicate, as: GoogleApi.ContainerAnalysis.V1beta1.Model.SlsaProvenanceV1) + field(:predicateType) + field(:subject, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Subject, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.InTotoSlsaProvenanceV1 do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.InTotoSlsaProvenanceV1.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.InTotoSlsaProvenanceV1 do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/justification.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/justification.ex new file mode 100644 index 0000000000..34c87fb61a --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/justification.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1beta1.Model.Justification do + @moduledoc """ + Justification provides the justification when the state of the assessment if NOT_AFFECTED. + + ## Attributes + + * `details` (*type:* `String.t`, *default:* `nil`) - Additional details on why this justification was chosen. + * `justificationType` (*type:* `String.t`, *default:* `nil`) - The justification type for this vulnerability. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :details => String.t() | nil, + :justificationType => String.t() | nil + } + + field(:details) + field(:justificationType) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Justification do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.Justification.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Justification do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/licenses_summary.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/licenses_summary.ex new file mode 100644 index 0000000000..15edc2245c --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/licenses_summary.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1beta1.Model.LicensesSummary do + @moduledoc """ + Per license count + + ## Attributes + + * `count` (*type:* `String.t`, *default:* `nil`) - The number of fixable vulnerabilities associated with this resource. + * `license` (*type:* `String.t`, *default:* `nil`) - The license of the package. Note that the format of this value is not guaranteed. It may be nil, an empty string, a boolean value (A | B), a differently formed boolean value (A OR B), etc... + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :count => String.t() | nil, + :license => String.t() | nil + } + + field(:count) + field(:license) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.LicensesSummary do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.LicensesSummary.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.LicensesSummary do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/note.ex index 1734af592a..f4345749a4 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/note.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/note.ex @@ -36,12 +36,14 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Note do * `relatedNoteNames` (*type:* `list(String.t)`, *default:* `nil`) - Other notes related to this note. * `relatedUrl` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t)`, *default:* `nil`) - URLs associated with this note. * `sbom` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentNote.t`, *default:* `nil`) - A note describing a software bill of materials. + * `sbomReference` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceNote.t`, *default:* `nil`) - A note describing an SBOM reference. * `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this note. * `spdxFile` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.FileNote.t`, *default:* `nil`) - A note describing an SPDX File. * `spdxPackage` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.PackageInfoNote.t`, *default:* `nil`) - A note describing an SPDX Package. * `spdxRelationship` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.RelationshipNote.t`, *default:* `nil`) - A note describing an SPDX File. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time this note was last updated. This field can be used as a filter in list requests. * `vulnerability` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Vulnerability.t`, *default:* `nil`) - A note describing a package vulnerability. + * `vulnerabilityAssessment` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.VulnerabilityAssessmentNote.t`, *default:* `nil`) - A note describing a vulnerability assessment. """ use GoogleApi.Gax.ModelBase @@ -62,13 +64,16 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Note do :relatedNoteNames => list(String.t()) | nil, :relatedUrl => list(GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t()) | nil, :sbom => GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentNote.t() | nil, + :sbomReference => GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceNote.t() | nil, :shortDescription => String.t() | nil, :spdxFile => GoogleApi.ContainerAnalysis.V1beta1.Model.FileNote.t() | nil, :spdxPackage => GoogleApi.ContainerAnalysis.V1beta1.Model.PackageInfoNote.t() | nil, :spdxRelationship => GoogleApi.ContainerAnalysis.V1beta1.Model.RelationshipNote.t() | nil, :updateTime => DateTime.t() | nil, - :vulnerability => GoogleApi.ContainerAnalysis.V1beta1.Model.Vulnerability.t() | nil + :vulnerability => GoogleApi.ContainerAnalysis.V1beta1.Model.Vulnerability.t() | nil, + :vulnerabilityAssessment => + GoogleApi.ContainerAnalysis.V1beta1.Model.VulnerabilityAssessmentNote.t() | nil } field(:attestationAuthority, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Authority) @@ -86,12 +91,17 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Note do field(:relatedNoteNames, type: :list) field(:relatedUrl, as: GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl, type: :list) field(:sbom, as: GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentNote) + field(:sbomReference, as: GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceNote) field(:shortDescription) field(:spdxFile, as: GoogleApi.ContainerAnalysis.V1beta1.Model.FileNote) field(:spdxPackage, as: GoogleApi.ContainerAnalysis.V1beta1.Model.PackageInfoNote) field(:spdxRelationship, as: GoogleApi.ContainerAnalysis.V1beta1.Model.RelationshipNote) field(:updateTime, as: DateTime) field(:vulnerability, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Vulnerability) + + field(:vulnerabilityAssessment, + as: GoogleApi.ContainerAnalysis.V1beta1.Model.VulnerabilityAssessmentNote + ) end defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Note do diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/occurrence.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/occurrence.ex index 2f58e18ca4..1f785e4851 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/occurrence.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/occurrence.ex @@ -36,6 +36,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Occurrence do * `remediation` (*type:* `String.t`, *default:* `nil`) - A description of actions that can be taken to remedy the note. * `resource` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Resource.t`, *default:* `nil`) - Required. Immutable. The resource for which the occurrence applies. * `sbom` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentOccurrence.t`, *default:* `nil`) - Describes a specific software bill of materials document. + * `sbomReference` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceOccurrence.t`, *default:* `nil`) - Describes a specific SBOM reference occurrences. * `spdxFile` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.FileOccurrence.t`, *default:* `nil`) - Describes a specific SPDX File. * `spdxPackage` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.PackageInfoOccurrence.t`, *default:* `nil`) - Describes a specific SPDX Package. * `spdxRelationship` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.RelationshipOccurrence.t`, *default:* `nil`) - Describes a specific SPDX Relationship. @@ -67,6 +68,8 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Occurrence do :remediation => String.t() | nil, :resource => GoogleApi.ContainerAnalysis.V1beta1.Model.Resource.t() | nil, :sbom => GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentOccurrence.t() | nil, + :sbomReference => + GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceOccurrence.t() | nil, :spdxFile => GoogleApi.ContainerAnalysis.V1beta1.Model.FileOccurrence.t() | nil, :spdxPackage => GoogleApi.ContainerAnalysis.V1beta1.Model.PackageInfoOccurrence.t() | nil, @@ -94,6 +97,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Occurrence do field(:remediation) field(:resource, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Resource) field(:sbom, as: GoogleApi.ContainerAnalysis.V1beta1.Model.DocumentOccurrence) + field(:sbomReference, as: GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceOccurrence) field(:spdxFile, as: GoogleApi.ContainerAnalysis.V1beta1.Model.FileOccurrence) field(:spdxPackage, as: GoogleApi.ContainerAnalysis.V1beta1.Model.PackageInfoOccurrence) field(:spdxRelationship, as: GoogleApi.ContainerAnalysis.V1beta1.Model.RelationshipOccurrence) diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/packages_summary_response.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/packages_summary_response.ex new file mode 100644 index 0000000000..ee205fa6e6 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/packages_summary_response.ex @@ -0,0 +1,54 @@ +# 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.ContainerAnalysis.V1beta1.Model.PackagesSummaryResponse do + @moduledoc """ + A summary of the packages found within the given resource. + + ## Attributes + + * `licensesSummary` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.LicensesSummary.t)`, *default:* `nil`) - A listing by license name of each of the licenses and their counts. + * `resourceUrl` (*type:* `String.t`, *default:* `nil`) - The unique URL of the image or the container for which this summary applies. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :licensesSummary => + list(GoogleApi.ContainerAnalysis.V1beta1.Model.LicensesSummary.t()) | nil, + :resourceUrl => String.t() | nil + } + + field(:licensesSummary, + as: GoogleApi.ContainerAnalysis.V1beta1.Model.LicensesSummary, + type: :list + ) + + field(:resourceUrl) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.PackagesSummaryResponse do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.PackagesSummaryResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.PackagesSummaryResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/policy.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/policy.ex index 191eb678ed..9393461129 100644 --- a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/policy.ex +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.ContainerAnalysis.V1beta1.Model.Policy do @moduledoc """ - An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). ## Attributes diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/product.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/product.ex new file mode 100644 index 0000000000..cfb3324663 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/product.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1beta1.Model.Product do + @moduledoc """ + Product contains information about a product and how to uniquely identify it. + + ## Attributes + + * `genericUri` (*type:* `String.t`, *default:* `nil`) - Contains a URI which is vendor-specific. Example: The artifact repository URL of an image. + * `id` (*type:* `String.t`, *default:* `nil`) - Token that identifies a product so that it can be referred to from other parts in the document. There is no predefined format as long as it uniquely identifies a group in the context of the current document. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the product. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :genericUri => String.t() | nil, + :id => String.t() | nil, + :name => String.t() | nil + } + + field(:genericUri) + field(:id) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Product do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.Product.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Product do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/provenance_builder.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/provenance_builder.ex new file mode 100644 index 0000000000..6fd684037a --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/provenance_builder.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.ContainerAnalysis.V1beta1.Model.ProvenanceBuilder do + @moduledoc """ + + + ## Attributes + + * `builderDependencies` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor.t)`, *default:* `nil`) - + * `id` (*type:* `String.t`, *default:* `nil`) - + * `version` (*type:* `map()`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :builderDependencies => + list(GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor.t()) | nil, + :id => String.t() | nil, + :version => map() | nil + } + + field(:builderDependencies, + as: GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor, + type: :list + ) + + field(:id) + field(:version, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.ProvenanceBuilder do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.ProvenanceBuilder.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.ProvenanceBuilder do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/publisher.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/publisher.ex new file mode 100644 index 0000000000..6c1f914386 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/publisher.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1beta1.Model.Publisher do + @moduledoc """ + Publisher contains information about the publisher of this Note. + + ## Attributes + + * `issuingAuthority` (*type:* `String.t`, *default:* `nil`) - Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the publisher. Examples: 'Google', 'Google Cloud Platform'. + * `publisherNamespace` (*type:* `String.t`, *default:* `nil`) - The context or namespace. Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party. Example: https://csaf.io + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :issuingAuthority => String.t() | nil, + :name => String.t() | nil, + :publisherNamespace => String.t() | nil + } + + field(:issuingAuthority) + field(:name) + field(:publisherNamespace) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Publisher do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.Publisher.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Publisher do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/remediation.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/remediation.ex new file mode 100644 index 0000000000..4294ecb120 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/remediation.ex @@ -0,0 +1,52 @@ +# 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.ContainerAnalysis.V1beta1.Model.Remediation do + @moduledoc """ + Specifies details on how to handle (and presumably, fix) a vulnerability. + + ## Attributes + + * `details` (*type:* `String.t`, *default:* `nil`) - Contains a comprehensive human-readable discussion of the remediation. + * `remediationType` (*type:* `String.t`, *default:* `nil`) - The type of remediation that can be applied. + * `remediationUri` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t`, *default:* `nil`) - Contains the URL where to obtain the remediation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :details => String.t() | nil, + :remediationType => String.t() | nil, + :remediationUri => GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t() | nil + } + + field(:details) + field(:remediationType) + field(:remediationUri, as: GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Remediation do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.Remediation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Remediation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/resource_descriptor.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/resource_descriptor.ex new file mode 100644 index 0000000000..166e1e4878 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/resource_descriptor.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.ContainerAnalysis.V1beta1.Model.ResourceDescriptor do + @moduledoc """ + + + ## Attributes + + * `annotations` (*type:* `map()`, *default:* `nil`) - + * `content` (*type:* `String.t`, *default:* `nil`) - + * `digest` (*type:* `map()`, *default:* `nil`) - + * `downloadLocation` (*type:* `String.t`, *default:* `nil`) - + * `mediaType` (*type:* `String.t`, *default:* `nil`) - + * `name` (*type:* `String.t`, *default:* `nil`) - + * `uri` (*type:* `String.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :annotations => map() | nil, + :content => String.t() | nil, + :digest => map() | nil, + :downloadLocation => String.t() | nil, + :mediaType => String.t() | nil, + :name => String.t() | nil, + :uri => String.t() | nil + } + + field(:annotations, type: :map) + field(:content) + field(:digest, type: :map) + field(:downloadLocation) + field(:mediaType) + field(:name) + field(:uri) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/run_details.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/run_details.ex new file mode 100644 index 0000000000..91ffc04aa8 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/run_details.ex @@ -0,0 +1,55 @@ +# 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.ContainerAnalysis.V1beta1.Model.RunDetails do + @moduledoc """ + + + ## Attributes + + * `builder` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.ProvenanceBuilder.t`, *default:* `nil`) - + * `byproducts` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor.t)`, *default:* `nil`) - + * `metadata` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.BuildMetadata.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :builder => GoogleApi.ContainerAnalysis.V1beta1.Model.ProvenanceBuilder.t() | nil, + :byproducts => + list(GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor.t()) | nil, + :metadata => GoogleApi.ContainerAnalysis.V1beta1.Model.BuildMetadata.t() | nil + } + + field(:builder, as: GoogleApi.ContainerAnalysis.V1beta1.Model.ProvenanceBuilder) + + field(:byproducts, as: GoogleApi.ContainerAnalysis.V1beta1.Model.ResourceDescriptor, type: :list) + + field(:metadata, as: GoogleApi.ContainerAnalysis.V1beta1.Model.BuildMetadata) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.RunDetails do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.RunDetails.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.RunDetails do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_intoto_payload.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_intoto_payload.ex new file mode 100644 index 0000000000..4b49980220 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_intoto_payload.ex @@ -0,0 +1,56 @@ +# 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.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPayload do + @moduledoc """ + The actual payload that contains the SBOM Reference data. The payload follows the intoto statement specification. See https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md for more details. + + ## Attributes + + * `_type` (*type:* `String.t`, *default:* `nil`) - Identifier for the schema of the Statement. + * `predicate` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPredicate.t`, *default:* `nil`) - Additional parameters of the Predicate. Includes the actual data about the SBOM. + * `predicateType` (*type:* `String.t`, *default:* `nil`) - URI identifying the type of the Predicate. + * `subject` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.Subject.t)`, *default:* `nil`) - Set of software artifacts that the attestation applies to. Each element represents a single software artifact. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :_type => String.t() | nil, + :predicate => + GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPredicate.t() | nil, + :predicateType => String.t() | nil, + :subject => list(GoogleApi.ContainerAnalysis.V1beta1.Model.Subject.t()) | nil + } + + field(:_type) + field(:predicate, as: GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPredicate) + field(:predicateType) + field(:subject, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Subject, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPayload do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPayload.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPayload do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_intoto_predicate.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_intoto_predicate.ex new file mode 100644 index 0000000000..a6651839ac --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_intoto_predicate.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.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPredicate do + @moduledoc """ + A predicate which describes the SBOM being referenced. + + ## Attributes + + * `digest` (*type:* `map()`, *default:* `nil`) - A map of algorithm to digest of the contents of the SBOM. + * `location` (*type:* `String.t`, *default:* `nil`) - The location of the SBOM. + * `mimeType` (*type:* `String.t`, *default:* `nil`) - The mime type of the SBOM. + * `referrerId` (*type:* `String.t`, *default:* `nil`) - The person or system referring this predicate to the consumer. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :digest => map() | nil, + :location => String.t() | nil, + :mimeType => String.t() | nil, + :referrerId => String.t() | nil + } + + field(:digest, type: :map) + field(:location) + field(:mimeType) + field(:referrerId) +end + +defimpl Poison.Decoder, + for: GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPredicate do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPredicate.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPredicate do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_note.ex new file mode 100644 index 0000000000..eb8a3f34df --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_note.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1beta1.Model.SBOMReferenceNote do + @moduledoc """ + The note representing an SBOM reference. + + ## Attributes + + * `format` (*type:* `String.t`, *default:* `nil`) - The format that SBOM takes. E.g. may be spdx, cyclonedx, etc... + * `version` (*type:* `String.t`, *default:* `nil`) - The version of the format that the SBOM takes. E.g. if the format is spdx, the version may be 2.3. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :format => String.t() | nil, + :version => String.t() | nil + } + + field(:format) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceNote do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceNote.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceNote do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_occurrence.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_occurrence.ex new file mode 100644 index 0000000000..797b552d08 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_reference_occurrence.ex @@ -0,0 +1,54 @@ +# 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.ContainerAnalysis.V1beta1.Model.SBOMReferenceOccurrence do + @moduledoc """ + The occurrence representing an SBOM reference as applied to a specific resource. The occurrence follows the DSSE specification. See https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more details. + + ## Attributes + + * `payload` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPayload.t`, *default:* `nil`) - The actual payload that contains the SBOM reference data. + * `payloadType` (*type:* `String.t`, *default:* `nil`) - The kind of payload that SbomReferenceIntotoPayload takes. Since it's in the intoto format, this value is expected to be 'application/vnd.in-toto+json'. + * `signatures` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.EnvelopeSignature.t)`, *default:* `nil`) - The signatures over the payload. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :payload => + GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPayload.t() | nil, + :payloadType => String.t() | nil, + :signatures => + list(GoogleApi.ContainerAnalysis.V1beta1.Model.EnvelopeSignature.t()) | nil + } + + field(:payload, as: GoogleApi.ContainerAnalysis.V1beta1.Model.SbomReferenceIntotoPayload) + field(:payloadType) + field(:signatures, as: GoogleApi.ContainerAnalysis.V1beta1.Model.EnvelopeSignature, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceOccurrence do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceOccurrence.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMReferenceOccurrence do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_status.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_status.ex new file mode 100644 index 0000000000..e8a18e2391 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/sbom_status.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1beta1.Model.SBOMStatus do + @moduledoc """ + The status of an SBOM generation. + + ## Attributes + + * `error` (*type:* `String.t`, *default:* `nil`) - If there was an error generating an SBOM, this will indicate what that error was. + * `sbomState` (*type:* `String.t`, *default:* `nil`) - The progress of the SBOM generation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :error => String.t() | nil, + :sbomState => String.t() | nil + } + + field(:error) + field(:sbomState) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMStatus do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMStatus.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.SBOMStatus do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/slsa_provenance_v1.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/slsa_provenance_v1.ex new file mode 100644 index 0000000000..3f4e89a968 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/slsa_provenance_v1.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1beta1.Model.SlsaProvenanceV1 do + @moduledoc """ + Keep in sync with schema at https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto Builder renamed to ProvenanceBuilder because of Java conflicts. + + ## Attributes + + * `buildDefinition` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.BuildDefinition.t`, *default:* `nil`) - + * `runDetails` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.RunDetails.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :buildDefinition => GoogleApi.ContainerAnalysis.V1beta1.Model.BuildDefinition.t() | nil, + :runDetails => GoogleApi.ContainerAnalysis.V1beta1.Model.RunDetails.t() | nil + } + + field(:buildDefinition, as: GoogleApi.ContainerAnalysis.V1beta1.Model.BuildDefinition) + field(:runDetails, as: GoogleApi.ContainerAnalysis.V1beta1.Model.RunDetails) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.SlsaProvenanceV1 do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.SlsaProvenanceV1.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.SlsaProvenanceV1 do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/subject.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/subject.ex new file mode 100644 index 0000000000..4d309bc1f4 --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/subject.ex @@ -0,0 +1,49 @@ +# 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.ContainerAnalysis.V1beta1.Model.Subject do + @moduledoc """ + Set of software artifacts that the attestation applies to. Each element represents a single software artifact. + + ## Attributes + + * `digest` (*type:* `map()`, *default:* `nil`) - `"": ""` Algorithms can be e.g. sha256, sha512 See https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet + * `name` (*type:* `String.t`, *default:* `nil`) - Identifier to distinguish this artifact from others within the subject. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :digest => map() | nil, + :name => String.t() | nil + } + + field(:digest, type: :map) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Subject do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.Subject.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.Subject do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/vex_assessment.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/vex_assessment.ex new file mode 100644 index 0000000000..ad4d7b645c --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/vex_assessment.ex @@ -0,0 +1,67 @@ +# 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.ContainerAnalysis.V1beta1.Model.VexAssessment do + @moduledoc """ + VexAssessment provides all publisher provided Vex information that is related to this vulnerability. + + ## Attributes + + * `cve` (*type:* `String.t`, *default:* `nil`) - Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. Deprecated: Use vulnerability_id instead to denote CVEs. + * `impacts` (*type:* `list(String.t)`, *default:* `nil`) - Contains information about the impact of this vulnerability, this will change with time. + * `justification` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Justification.t`, *default:* `nil`) - Justification provides the justification when the state of the assessment if NOT_AFFECTED. + * `noteName` (*type:* `String.t`, *default:* `nil`) - The VulnerabilityAssessment note from which this VexAssessment was generated. This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. + * `relatedUris` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t)`, *default:* `nil`) - Holds a list of references associated with this vulnerability item and assessment. + * `remediations` (*type:* `list(GoogleApi.ContainerAnalysis.V1beta1.Model.Remediation.t)`, *default:* `nil`) - Specifies details on how to handle (and presumably, fix) a vulnerability. + * `state` (*type:* `String.t`, *default:* `nil`) - Provides the state of this Vulnerability assessment. + * `vulnerabilityId` (*type:* `String.t`, *default:* `nil`) - The vulnerability identifier for this Assessment. Will hold one of common identifiers e.g. CVE, GHSA etc. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cve => String.t() | nil, + :impacts => list(String.t()) | nil, + :justification => GoogleApi.ContainerAnalysis.V1beta1.Model.Justification.t() | nil, + :noteName => String.t() | nil, + :relatedUris => list(GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl.t()) | nil, + :remediations => list(GoogleApi.ContainerAnalysis.V1beta1.Model.Remediation.t()) | nil, + :state => String.t() | nil, + :vulnerabilityId => String.t() | nil + } + + field(:cve) + field(:impacts, type: :list) + field(:justification, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Justification) + field(:noteName) + field(:relatedUris, as: GoogleApi.ContainerAnalysis.V1beta1.Model.RelatedUrl, type: :list) + field(:remediations, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Remediation, type: :list) + field(:state) + field(:vulnerabilityId) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.VexAssessment do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.VexAssessment.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.VexAssessment do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/vulnerability_assessment_note.ex b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/vulnerability_assessment_note.ex new file mode 100644 index 0000000000..3250a61e2a --- /dev/null +++ b/clients/container_analysis/lib/google_api/container_analysis/v1beta1/model/vulnerability_assessment_note.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.ContainerAnalysis.V1beta1.Model.VulnerabilityAssessmentNote do + @moduledoc """ + A single VulnerabilityAssessmentNote represents one particular product's vulnerability assessment for one CVE. + + ## Attributes + + * `assessment` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Assessment.t`, *default:* `nil`) - Represents a vulnerability assessment for the product. + * `languageCode` (*type:* `String.t`, *default:* `nil`) - Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646. + * `longDescription` (*type:* `String.t`, *default:* `nil`) - A detailed description of this Vex. + * `product` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Product.t`, *default:* `nil`) - The product affected by this vex. + * `publisher` (*type:* `GoogleApi.ContainerAnalysis.V1beta1.Model.Publisher.t`, *default:* `nil`) - Publisher details of this Note. + * `shortDescription` (*type:* `String.t`, *default:* `nil`) - A one sentence description of this Vex. + * `title` (*type:* `String.t`, *default:* `nil`) - The title of the note. E.g. `Vex-Debian-11.4` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :assessment => GoogleApi.ContainerAnalysis.V1beta1.Model.Assessment.t() | nil, + :languageCode => String.t() | nil, + :longDescription => String.t() | nil, + :product => GoogleApi.ContainerAnalysis.V1beta1.Model.Product.t() | nil, + :publisher => GoogleApi.ContainerAnalysis.V1beta1.Model.Publisher.t() | nil, + :shortDescription => String.t() | nil, + :title => String.t() | nil + } + + field(:assessment, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Assessment) + field(:languageCode) + field(:longDescription) + field(:product, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Product) + field(:publisher, as: GoogleApi.ContainerAnalysis.V1beta1.Model.Publisher) + field(:shortDescription) + field(:title) +end + +defimpl Poison.Decoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.VulnerabilityAssessmentNote do + def decode(value, options) do + GoogleApi.ContainerAnalysis.V1beta1.Model.VulnerabilityAssessmentNote.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ContainerAnalysis.V1beta1.Model.VulnerabilityAssessmentNote do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/container_analysis/mix.exs b/clients/container_analysis/mix.exs index eadac01651..dc84dbb2df 100644 --- a/clients/container_analysis/mix.exs +++ b/clients/container_analysis/mix.exs @@ -48,7 +48,7 @@ defmodule GoogleApi.ContainerAnalysis.Mixfile do defp description() do """ - Container Analysis API client library. An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts. + Container Analysis API client library. """ end