diff --git a/clients/logging/lib/google_api/logging/v2/api/billing_accounts.ex b/clients/logging/lib/google_api/logging/v2/api/billing_accounts.ex index 4af9c3f3c0..d7a7ae19c5 100644 --- a/clients/logging/lib/google_api/logging/v2/api/billing_accounts.ex +++ b/clients/logging/lib/google_api/logging/v2/api/billing_accounts.ex @@ -26,12 +26,12 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do @library_version Mix.Project.config() |> Keyword.get(:version, "") @doc """ - Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve CMEK settings. "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve CMEK settings. "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -96,12 +96,12 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do end @doc """ - Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Gets the settings for the given resource.Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts.See View default resource settings for Logging (https://cloud.google.com/logging/docs/default-settings#view-org-settings) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"organizations/12345/settings"Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"organizations/12345/settings"Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -707,7 +707,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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"). - * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. + * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -765,6 +765,87 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogBucket{}]) end + @doc """ + Creates a log bucket asynchronously that can be used to store log entries.After a bucket has been created, the bucket's location cannot be changed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The resource in which to create the log bucket: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example:"projects/my-project/locations/global" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `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"). + * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_billing_accounts_locations_buckets_create_async( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_billing_accounts_locations_buckets_create_async( + connection, + billing_accounts_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, + :bucketId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets:createAsync", + %{ + "billingAccountsId" => URI.encode(billing_accounts_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.Logging.V2.Model.Operation{}]) + end + @doc """ Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted. @@ -1006,7 +1087,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do end @doc """ - Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. + Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. ## Parameters @@ -1174,14 +1255,14 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do end @doc """ - Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. + Updates a log bucket asynchronously.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket in which to create the view `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example:"projects/my-project/locations/global/buckets/my-bucket" - * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. - * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the bucket to update. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1194,16 +1275,16 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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"). - * `:viewId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. - * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `:updateMask` (*type:* `String.t`) - Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_billing_accounts_locations_buckets_views_create( + @spec logging_billing_accounts_locations_buckets_update_async( Tesla.Env.client(), String.t(), String.t(), @@ -1211,11 +1292,11 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_billing_accounts_locations_buckets_views_create( + def logging_billing_accounts_locations_buckets_update_async( connection, billing_accounts_id, locations_id, @@ -1235,7 +1316,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :viewId => :query, + :updateMask => :query, :body => :body } @@ -1243,7 +1324,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do Request.new() |> Request.method(:post) |> Request.url( - "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views", + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}:updateAsync", %{ "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), @@ -1255,19 +1336,18 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. + Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currently only contain one link. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to delete: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. - * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The full resource name of the bucket to create a link for. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1280,32 +1360,32 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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"). + * `:linkId` (*type:* `String.t`) - Required. The ID to use for the link. The link_id can have up to 100 characters. A valid link_id must only have alphanumeric characters and underscores within it. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.Link.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_billing_accounts_locations_buckets_views_delete( + @spec logging_billing_accounts_locations_buckets_links_create( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_billing_accounts_locations_buckets_views_delete( + def logging_billing_accounts_locations_buckets_links_create( connection, billing_accounts_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1320,19 +1400,20 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :linkId => :query, + :body => :body } request = Request.new() - |> Request.method(:delete) + |> Request.method(:post) |> Request.url( - "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/links", %{ "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1340,19 +1421,19 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Empty{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Gets a view on a log bucket.. + Deletes a link. This will also delete the corresponding BigQuery linked dataset. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the policy: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the link to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `links_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1369,10 +1450,10 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_billing_accounts_locations_buckets_views_get( + @spec logging_billing_accounts_locations_buckets_links_delete( Tesla.Env.client(), String.t(), String.t(), @@ -1381,16 +1462,16 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_billing_accounts_locations_buckets_views_get( + def logging_billing_accounts_locations_buckets_links_delete( connection, billing_accounts_id, locations_id, buckets_id, - views_id, + links_id, optional_params \\ [], opts \\ [] ) do @@ -1410,14 +1491,14 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do request = Request.new() - |> Request.method(:get) + |> Request.method(:delete) |> Request.url( - "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/links/{linksId}", %{ "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "linksId" => URI.encode(links_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1425,18 +1506,19 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Lists views on a log bucket. + Gets a link. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket whose views are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. - * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the link: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `links_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1449,32 +1531,32 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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"). - * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. - * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListViewsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Link{}}` on success * `{:error, info}` on failure """ - @spec logging_billing_accounts_locations_buckets_views_list( + @spec logging_billing_accounts_locations_buckets_links_get( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListViewsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.Link.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_billing_accounts_locations_buckets_views_list( + def logging_billing_accounts_locations_buckets_links_get( connection, billing_accounts_id, locations_id, buckets_id, + links_id, optional_params \\ [], opts \\ [] ) do @@ -1489,20 +1571,19 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query + :upload_protocol => :query } request = Request.new() |> Request.method(:get) |> Request.url( - "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views", + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/links/{linksId}", %{ "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "linksId" => URI.encode(links_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1510,19 +1591,18 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListViewsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Link{}]) end @doc """ - Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. + Lists links. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to update "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. - * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The parent resource whose links are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1535,34 +1615,32 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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"). - * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter - * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.ListLinksResponse{}}` on success * `{:error, info}` on failure """ - @spec logging_billing_accounts_locations_buckets_views_patch( + @spec logging_billing_accounts_locations_buckets_links_list( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.ListLinksResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_billing_accounts_locations_buckets_views_patch( + def logging_billing_accounts_locations_buckets_links_list( connection, billing_accounts_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1578,20 +1656,19 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :updateMask => :query, - :body => :body + :pageSize => :query, + :pageToken => :query } request = Request.new() - |> Request.method(:patch) + |> Request.method(:get) |> Request.url( - "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/links", %{ "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1599,19 +1676,18 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListLinksResponse{}]) end @doc """ - Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. + Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket in which to create the view `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example:"projects/my-project/locations/global/buckets/my-bucket" * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. - * `views_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1624,35 +1700,32 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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"). - * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. - * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * `:resourceNames` (*type:* `list(String.t)`) - Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `:viewId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListLogsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success * `{:error, info}` on failure """ - @spec logging_billing_accounts_locations_buckets_views_logs_list( + @spec logging_billing_accounts_locations_buckets_views_create( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListLogsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_billing_accounts_locations_buckets_views_logs_list( + def logging_billing_accounts_locations_buckets_views_create( connection, billing_accounts_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1668,21 +1741,19 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query, - :resourceNames => :query + :viewId => :query, + :body => :body } request = Request.new() - |> Request.method(:get) + |> Request.method(:post) |> Request.url( - "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}/logs", + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views", %{ "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1690,18 +1761,19 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListLogsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) end @doc """ - Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be cancelled. + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to delete: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1714,7 +1786,6 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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.Logging.V2.Model.CancelOperationRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -1722,11 +1793,12 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec logging_billing_accounts_locations_operations_cancel( + @spec logging_billing_accounts_locations_buckets_views_delete( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: @@ -1734,11 +1806,12 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_billing_accounts_locations_operations_cancel( + def logging_billing_accounts_locations_buckets_views_delete( connection, billing_accounts_id, locations_id, - operations_id, + buckets_id, + views_id, optional_params \\ [], opts \\ [] ) do @@ -1753,19 +1826,19 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :body => :body + :upload_protocol => :query } request = Request.new() - |> Request.method(:post) + |> Request.method(:delete) |> Request.url( - "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", %{ "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1777,14 +1850,15 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do end @doc """ - Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + Gets a view on a log bucket. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the policy: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1801,18 +1875,450 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success * `{:error, info}` on failure """ - @spec logging_billing_accounts_locations_operations_get( + @spec logging_billing_accounts_locations_buckets_views_get( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_billing_accounts_locations_buckets_views_get( + connection, + billing_accounts_id, + locations_id, + buckets_id, + views_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( + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + %{ + "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.LogView{}]) + end + + @doc """ + Lists views on a log bucket. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket whose views are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListViewsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_billing_accounts_locations_buckets_views_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListViewsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_billing_accounts_locations_buckets_views_list( + connection, + billing_accounts_id, + locations_id, + buckets_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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views", + %{ + "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_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.Logging.V2.Model.ListViewsResponse{}]) + end + + @doc """ + Updates a view on a log bucket. This method replaces the value of the filter field from the existing view with the corresponding value from the new view. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to update "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `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"). + * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:error, info}` on failure + """ + @spec logging_billing_accounts_locations_buckets_views_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_billing_accounts_locations_buckets_views_patch( + connection, + billing_accounts_id, + locations_id, + buckets_id, + views_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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + %{ + "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.LogView{}]) + end + + @doc """ + Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name to list logs for: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `views_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `:resourceNames` (*type:* `list(String.t)`) - Optional. List of resource names to list logs for: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]The resource name in the parent field is added to this list. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListLogsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_billing_accounts_locations_buckets_views_logs_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListLogsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_billing_accounts_locations_buckets_views_logs_list( + connection, + billing_accounts_id, + locations_id, + buckets_id, + views_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, + :pageSize => :query, + :pageToken => :query, + :resourceNames => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}/logs", + %{ + "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.ListLogsResponse{}]) + end + + @doc """ + Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be cancelled. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `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.Logging.V2.Model.CancelOperationRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec logging_billing_accounts_locations_operations_cancel( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_billing_accounts_locations_operations_cancel( + connection, + billing_accounts_id, + locations_id, + operations_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( + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/operations/{operationsId}:cancel", + %{ + "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.Logging.V2.Model.Empty{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `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.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_billing_accounts_locations_operations_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} @@ -1820,7 +2326,88 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do connection, billing_accounts_id, locations_id, - operations_id, + operations_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( + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/operations/{operationsId}", + %{ + "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.Logging.V2.Model.Operation{}]) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. The name of the operation's parent resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `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 standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_billing_accounts_locations_operations_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_billing_accounts_locations_operations_list( + connection, + billing_accounts_id, + locations_id, optional_params \\ [], opts \\ [] ) do @@ -1835,18 +2422,20 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url( - "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/operations/{operationsId}", + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/operations", %{ "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), - "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1854,17 +2443,180 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListOperationsResponse{}]) end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists the RecentQueries that were created by the user making the request. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. The name of the operation's parent resource. + * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The resource to which the listed queries belong. "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:projects/my-project/locations/us-central1Note: The location portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all recent queries. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListRecentQueriesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_billing_accounts_locations_recent_queries_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListRecentQueriesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_billing_accounts_locations_recent_queries_list( + connection, + billing_accounts_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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/recentQueries", + %{ + "billingAccountsId" => URI.encode(billing_accounts_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.Logging.V2.Model.ListRecentQueriesResponse{}]) + end + + @doc """ + Creates a new SavedQuery for the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The parent resource in which to create the saved query: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: "projects/my-project/locations/global" "organizations/123456789/locations/us-central1" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `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"). + * `:savedQueryId` (*type:* `String.t`) - Optional. The ID to use for the saved query, which will become the final component of the saved query's resource name.If the saved_query_id is not provided, the system will generate an alphanumeric ID.The saved_query_id is limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.SavedQuery.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.SavedQuery{}}` on success + * `{:error, info}` on failure + """ + @spec logging_billing_accounts_locations_saved_queries_create( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.SavedQuery.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_billing_accounts_locations_saved_queries_create( + connection, + billing_accounts_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, + :savedQueryId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/savedQueries", + %{ + "billingAccountsId" => URI.encode(billing_accounts_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.Logging.V2.Model.SavedQuery{}]) + end + + @doc """ + Deletes an existing SavedQuery that was created by the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `billing_accounts_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the saved query to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For example: "projects/my-project/locations/global/savedQueries/my-saved-query" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. + * `saved_queries_id` (*type:* `String.t`) - Part of `name`. See documentation of `billingAccountsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1877,28 +2629,108 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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 standard list filter. - * `:pageSize` (*type:* `integer()`) - The standard list page size. - * `:pageToken` (*type:* `String.t`) - The standard list page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListOperationsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec logging_billing_accounts_locations_operations_list( + @spec logging_billing_accounts_locations_saved_queries_delete( Tesla.Env.client(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListOperationsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.Empty.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_billing_accounts_locations_operations_list( + def logging_billing_accounts_locations_saved_queries_delete( + connection, + billing_accounts_id, + locations_id, + saved_queries_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(:delete) + |> Request.url( + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/savedQueries/{savedQueriesId}", + %{ + "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "savedQueriesId" => + URI.encode(saved_queries_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.Logging.V2.Model.Empty{}]) + end + + @doc """ + Lists the SavedQueries that were created by the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The resource to which the listed queries belong. "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: "projects/my-project/locations/us-central1" Note: The locations portion of the resource must be specified. To get a list of all saved queries, a wildcard character - can be used for LOCATION_ID, for example: "projects/my-project/locations/-" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `billingAccountsId`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListSavedQueriesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_billing_accounts_locations_saved_queries_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListSavedQueriesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_billing_accounts_locations_saved_queries_list( connection, billing_accounts_id, locations_id, @@ -1917,7 +2749,6 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :filter => :query, :pageSize => :query, :pageToken => :query } @@ -1926,7 +2757,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do Request.new() |> Request.method(:get) |> Request.url( - "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/operations", + "/v2/billingAccounts/{billingAccountsId}/locations/{locationsId}/savedQueries", %{ "billingAccountsId" => URI.encode(billing_accounts_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1) @@ -1937,7 +2768,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListOperationsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListSavedQueriesResponse{}]) end @doc """ @@ -2020,7 +2851,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `billing_accounts_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name to list logs for: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -2035,7 +2866,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * `:resourceNames` (*type:* `list(String.t)`) - Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `:resourceNames` (*type:* `list(String.t)`) - Optional. List of resource names to list logs for: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]The resource name in the parent field is added to this list. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -2086,7 +2917,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do end @doc """ - Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + Creates a sink that exports specified log entries to a destination. The export begins upon ingress, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. ## Parameters @@ -2104,7 +2935,8 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) used by the sinks with the same parent. For more information, see writer_identity in LogSink. * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2141,6 +2973,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :body => :body } @@ -2377,7 +3210,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do end @doc """ - Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field. + Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. ## Parameters @@ -2396,7 +3229,8 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) owned by Cloud Logging. It is an error if the old value is true and the new value is set to false or defaulted to false. * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2436,6 +3270,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :updateMask => :query, :body => :body @@ -2457,7 +3292,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do end @doc """ - Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field. + Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. ## Parameters @@ -2476,7 +3311,8 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) owned by Cloud Logging. It is an error if the old value is true and the new value is set to false or defaulted to false. * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2516,6 +3352,7 @@ defmodule GoogleApi.Logging.V2.Api.BillingAccounts do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :updateMask => :query, :body => :body diff --git a/clients/logging/lib/google_api/logging/v2/api/entries.ex b/clients/logging/lib/google_api/logging/v2/api/entries.ex index 5a101021b7..339058b8f4 100644 --- a/clients/logging/lib/google_api/logging/v2/api/entries.ex +++ b/clients/logging/lib/google_api/logging/v2/api/entries.ex @@ -144,7 +144,7 @@ defmodule GoogleApi.Logging.V2.Api.Entries do end @doc """ - Streaming read of log entries as they are ingested. Until the stream is terminated, it will continue reading logs. + Streaming read of log entries as they are received. Until the stream is terminated, it will continue reading logs. ## Parameters @@ -203,7 +203,7 @@ defmodule GoogleApi.Logging.V2.Api.Entries do end @doc """ - Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders) + Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resource names (projects, organizations, billing accounts or folders), where the resource name for a log entry is determined from its logName field. ## Parameters diff --git a/clients/logging/lib/google_api/logging/v2/api/folders.ex b/clients/logging/lib/google_api/logging/v2/api/folders.ex index 587eb7f93e..14971fc709 100644 --- a/clients/logging/lib/google_api/logging/v2/api/folders.ex +++ b/clients/logging/lib/google_api/logging/v2/api/folders.ex @@ -26,12 +26,12 @@ defmodule GoogleApi.Logging.V2.Api.Folders do @library_version Mix.Project.config() |> Keyword.get(:version, "") @doc """ - Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve CMEK settings. "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve CMEK settings. "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -86,12 +86,12 @@ defmodule GoogleApi.Logging.V2.Api.Folders do end @doc """ - Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Gets the settings for the given resource.Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts.See View default resource settings for Logging (https://cloud.google.com/logging/docs/default-settings#view-org-settings) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"organizations/12345/settings"Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"organizations/12345/settings"Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -146,12 +146,12 @@ defmodule GoogleApi.Logging.V2.Api.Folders do end @doc """ - Updates the Log Router settings for the given resource.Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled. 4) location_id is not supported by Logging. 5) location_id violate OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Updates the settings for the given resource. This method applies to all feature configurations for organization and folders.UpdateSettings fails when any of the following are true: The value of storage_location either isn't supported by Logging or violates the location OrgPolicy. The default_sink_config field is set, but it has an unspecified filter write mode. The value of kms_key_name is invalid. The associated service account doesn't have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access to the key is disabled.See Configure default settings for organizations and folders (https://cloud.google.com/logging/docs/default-settings) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The resource name for the settings to update. "organizations/[ORGANIZATION_ID]/settings" For example:"organizations/12345/settings"Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The resource name for the settings to update. "organizations/[ORGANIZATION_ID]/settings" For example:"organizations/12345/settings" * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -721,7 +721,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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"). - * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. + * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -779,6 +779,84 @@ defmodule GoogleApi.Logging.V2.Api.Folders do |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogBucket{}]) end + @doc """ + Creates a log bucket asynchronously that can be used to store log entries.After a bucket has been created, the bucket's location cannot be changed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The resource in which to create the log bucket: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example:"projects/my-project/locations/global" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `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"). + * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_folders_locations_buckets_create_async( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_folders_locations_buckets_create_async( + connection, + folders_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, + :bucketId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/folders/{foldersId}/locations/{locationsId}/buckets:createAsync", %{ + "foldersId" => URI.encode(folders_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.Logging.V2.Model.Operation{}]) + end + @doc """ Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted. @@ -1014,7 +1092,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do end @doc """ - Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. + Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. ## Parameters @@ -1179,14 +1257,14 @@ defmodule GoogleApi.Logging.V2.Api.Folders do end @doc """ - Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. + Updates a log bucket asynchronously.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket in which to create the view `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example:"projects/my-project/locations/global/buckets/my-bucket" - * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. - * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the bucket to update. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1199,16 +1277,16 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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"). - * `:viewId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. - * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `:updateMask` (*type:* `String.t`) - Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_folders_locations_buckets_views_create( + @spec logging_folders_locations_buckets_update_async( Tesla.Env.client(), String.t(), String.t(), @@ -1216,11 +1294,11 @@ defmodule GoogleApi.Logging.V2.Api.Folders do keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_folders_locations_buckets_views_create( + def logging_folders_locations_buckets_update_async( connection, folders_id, locations_id, @@ -1240,7 +1318,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :viewId => :query, + :updateMask => :query, :body => :body } @@ -1248,7 +1326,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do Request.new() |> Request.method(:post) |> Request.url( - "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views", + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}:updateAsync", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), @@ -1260,19 +1338,18 @@ defmodule GoogleApi.Logging.V2.Api.Folders do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. + Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currently only contain one link. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to delete: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. - * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The full resource name of the bucket to create a link for. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1285,32 +1362,32 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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"). + * `:linkId` (*type:* `String.t`) - Required. The ID to use for the link. The link_id can have up to 100 characters. A valid link_id must only have alphanumeric characters and underscores within it. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.Link.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_folders_locations_buckets_views_delete( + @spec logging_folders_locations_buckets_links_create( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_folders_locations_buckets_views_delete( + def logging_folders_locations_buckets_links_create( connection, folders_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1325,19 +1402,20 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :linkId => :query, + :body => :body } request = Request.new() - |> Request.method(:delete) + |> Request.method(:post) |> Request.url( - "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/links", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1345,19 +1423,19 @@ defmodule GoogleApi.Logging.V2.Api.Folders do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Empty{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Gets a view on a log bucket.. + Deletes a link. This will also delete the corresponding BigQuery linked dataset. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the policy: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the link to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `links_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1374,10 +1452,10 @@ defmodule GoogleApi.Logging.V2.Api.Folders do ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_folders_locations_buckets_views_get( + @spec logging_folders_locations_buckets_links_delete( Tesla.Env.client(), String.t(), String.t(), @@ -1386,16 +1464,16 @@ defmodule GoogleApi.Logging.V2.Api.Folders do keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_folders_locations_buckets_views_get( + def logging_folders_locations_buckets_links_delete( connection, folders_id, locations_id, buckets_id, - views_id, + links_id, optional_params \\ [], opts \\ [] ) do @@ -1415,14 +1493,14 @@ defmodule GoogleApi.Logging.V2.Api.Folders do request = Request.new() - |> Request.method(:get) + |> Request.method(:delete) |> Request.url( - "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/links/{linksId}", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "linksId" => URI.encode(links_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1430,18 +1508,19 @@ defmodule GoogleApi.Logging.V2.Api.Folders do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Lists views on a log bucket. + Gets a link. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket whose views are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. - * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the link: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `links_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1454,32 +1533,32 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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"). - * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. - * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListViewsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Link{}}` on success * `{:error, info}` on failure """ - @spec logging_folders_locations_buckets_views_list( + @spec logging_folders_locations_buckets_links_get( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListViewsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.Link.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_folders_locations_buckets_views_list( + def logging_folders_locations_buckets_links_get( connection, folders_id, locations_id, buckets_id, + links_id, optional_params \\ [], opts \\ [] ) do @@ -1494,20 +1573,19 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query + :upload_protocol => :query } request = Request.new() |> Request.method(:get) |> Request.url( - "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views", + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/links/{linksId}", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "linksId" => URI.encode(links_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1515,19 +1593,18 @@ defmodule GoogleApi.Logging.V2.Api.Folders do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListViewsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Link{}]) end @doc """ - Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. + Lists links. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to update "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. - * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The parent resource whose links are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1540,34 +1617,32 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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"). - * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter - * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.ListLinksResponse{}}` on success * `{:error, info}` on failure """ - @spec logging_folders_locations_buckets_views_patch( + @spec logging_folders_locations_buckets_links_list( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.ListLinksResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_folders_locations_buckets_views_patch( + def logging_folders_locations_buckets_links_list( connection, folders_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1583,20 +1658,19 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :updateMask => :query, - :body => :body + :pageSize => :query, + :pageToken => :query } request = Request.new() - |> Request.method(:patch) + |> Request.method(:get) |> Request.url( - "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/links", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1604,19 +1678,18 @@ defmodule GoogleApi.Logging.V2.Api.Folders do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListLinksResponse{}]) end @doc """ - Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. + Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket in which to create the view `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example:"projects/my-project/locations/global/buckets/my-bucket" * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. - * `views_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1629,35 +1702,32 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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"). - * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. - * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * `:resourceNames` (*type:* `list(String.t)`) - Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `:viewId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListLogsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success * `{:error, info}` on failure """ - @spec logging_folders_locations_buckets_views_logs_list( + @spec logging_folders_locations_buckets_views_create( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListLogsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_folders_locations_buckets_views_logs_list( + def logging_folders_locations_buckets_views_create( connection, folders_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1673,21 +1743,19 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query, - :resourceNames => :query + :viewId => :query, + :body => :body } request = Request.new() - |> Request.method(:get) + |> Request.method(:post) |> Request.url( - "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}/logs", + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1695,18 +1763,19 @@ defmodule GoogleApi.Logging.V2.Api.Folders do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListLogsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) end @doc """ - Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be cancelled. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to delete: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1719,7 +1788,6 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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.Logging.V2.Model.CancelOperationRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -1727,11 +1795,12 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec logging_folders_locations_operations_cancel( + @spec logging_folders_locations_buckets_views_delete( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: @@ -1739,11 +1808,12 @@ defmodule GoogleApi.Logging.V2.Api.Folders do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_folders_locations_operations_cancel( + def logging_folders_locations_buckets_views_delete( connection, folders_id, locations_id, - operations_id, + buckets_id, + views_id, optional_params \\ [], opts \\ [] ) do @@ -1758,19 +1828,19 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :body => :body + :upload_protocol => :query } request = Request.new() - |> Request.method(:post) + |> Request.method(:delete) |> Request.url( - "/v2/folders/{foldersId}/locations/{locationsId}/operations/{operationsId}:cancel", + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1782,14 +1852,15 @@ defmodule GoogleApi.Logging.V2.Api.Folders do end @doc """ - Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + Gets a view on a log bucket. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the policy: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1806,26 +1877,539 @@ defmodule GoogleApi.Logging.V2.Api.Folders do ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success * `{:error, info}` on failure """ - @spec logging_folders_locations_operations_get( + @spec logging_folders_locations_buckets_views_get( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_folders_locations_operations_get( + def logging_folders_locations_buckets_views_get( + connection, + folders_id, + locations_id, + buckets_id, + views_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( + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.LogView{}]) + end + + @doc """ + Lists views on a log bucket. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket whose views are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListViewsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_folders_locations_buckets_views_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListViewsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_folders_locations_buckets_views_list( + connection, + folders_id, + locations_id, + buckets_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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_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.Logging.V2.Model.ListViewsResponse{}]) + end + + @doc """ + Updates a view on a log bucket. This method replaces the value of the filter field from the existing view with the corresponding value from the new view. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to update "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `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"). + * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:error, info}` on failure + """ + @spec logging_folders_locations_buckets_views_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_folders_locations_buckets_views_patch( + connection, + folders_id, + locations_id, + buckets_id, + views_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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.LogView{}]) + end + + @doc """ + Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name to list logs for: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `views_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `:resourceNames` (*type:* `list(String.t)`) - Optional. List of resource names to list logs for: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]The resource name in the parent field is added to this list. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListLogsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_folders_locations_buckets_views_logs_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListLogsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_folders_locations_buckets_views_logs_list( + connection, + folders_id, + locations_id, + buckets_id, + views_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, + :pageSize => :query, + :pageToken => :query, + :resourceNames => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v2/folders/{foldersId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}/logs", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.ListLogsResponse{}]) + end + + @doc """ + Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be cancelled. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `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.Logging.V2.Model.CancelOperationRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec logging_folders_locations_operations_cancel( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_folders_locations_operations_cancel( + connection, + folders_id, + locations_id, + operations_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( + "/v2/folders/{foldersId}/locations/{locationsId}/operations/{operationsId}:cancel", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.Logging.V2.Model.Empty{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `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.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_folders_locations_operations_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_folders_locations_operations_get( + connection, + folders_id, + locations_id, + operations_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( + "/v2/folders/{foldersId}/locations/{locationsId}/operations/{operationsId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.Logging.V2.Model.Operation{}]) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. The name of the operation's parent resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `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 standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_folders_locations_operations_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_folders_locations_operations_list( connection, folders_id, locations_id, - operations_id, optional_params \\ [], opts \\ [] ) do @@ -1840,18 +2424,255 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/folders/{foldersId}/locations/{locationsId}/operations", %{ + "foldersId" => URI.encode(folders_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.Logging.V2.Model.ListOperationsResponse{}]) + end + + @doc """ + Lists the RecentQueries that were created by the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The resource to which the listed queries belong. "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:projects/my-project/locations/us-central1Note: The location portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all recent queries. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListRecentQueriesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_folders_locations_recent_queries_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListRecentQueriesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_folders_locations_recent_queries_list( + connection, + folders_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, + :pageSize => :query, + :pageToken => :query } request = Request.new() |> Request.method(:get) + |> Request.url("/v2/folders/{foldersId}/locations/{locationsId}/recentQueries", %{ + "foldersId" => URI.encode(folders_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.Logging.V2.Model.ListRecentQueriesResponse{}]) + end + + @doc """ + Creates a new SavedQuery for the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The parent resource in which to create the saved query: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: "projects/my-project/locations/global" "organizations/123456789/locations/us-central1" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. + * `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"). + * `:savedQueryId` (*type:* `String.t`) - Optional. The ID to use for the saved query, which will become the final component of the saved query's resource name.If the saved_query_id is not provided, the system will generate an alphanumeric ID.The saved_query_id is limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.SavedQuery.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.SavedQuery{}}` on success + * `{:error, info}` on failure + """ + @spec logging_folders_locations_saved_queries_create( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.SavedQuery.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_folders_locations_saved_queries_create( + connection, + folders_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, + :savedQueryId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/folders/{foldersId}/locations/{locationsId}/savedQueries", %{ + "foldersId" => URI.encode(folders_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.Logging.V2.Model.SavedQuery{}]) + end + + @doc """ + Deletes an existing SavedQuery that was created by the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the saved query to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For example: "projects/my-project/locations/global/savedQueries/my-saved-query" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `saved_queries_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `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.Logging.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec logging_folders_locations_saved_queries_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_folders_locations_saved_queries_delete( + connection, + folders_id, + locations_id, + saved_queries_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(:delete) |> Request.url( - "/v2/folders/{foldersId}/locations/{locationsId}/operations/{operationsId}", + "/v2/folders/{foldersId}/locations/{locationsId}/savedQueries/{savedQueriesId}", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "savedQueriesId" => + URI.encode(saved_queries_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1859,17 +2680,17 @@ defmodule GoogleApi.Logging.V2.Api.Folders do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Empty{}]) end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists the SavedQueries that were created by the user making the request. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. The name of the operation's parent resource. - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The resource to which the listed queries belong. "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: "projects/my-project/locations/us-central1" Note: The locations portion of the resource must be specified. To get a list of all saved queries, a wildcard character - can be used for LOCATION_ID, for example: "projects/my-project/locations/-" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1882,28 +2703,27 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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 standard list filter. - * `:pageSize` (*type:* `integer()`) - The standard list page size. - * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListOperationsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.ListSavedQueriesResponse{}}` on success * `{:error, info}` on failure """ - @spec logging_folders_locations_operations_list( + @spec logging_folders_locations_saved_queries_list( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListOperationsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.ListSavedQueriesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_folders_locations_operations_list( + def logging_folders_locations_saved_queries_list( connection, folders_id, locations_id, @@ -1922,7 +2742,6 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :filter => :query, :pageSize => :query, :pageToken => :query } @@ -1930,7 +2749,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do request = Request.new() |> Request.method(:get) - |> Request.url("/v2/folders/{foldersId}/locations/{locationsId}/operations", %{ + |> Request.url("/v2/folders/{foldersId}/locations/{locationsId}/savedQueries", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1) }) @@ -1939,7 +2758,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListOperationsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListSavedQueriesResponse{}]) end @doc """ @@ -2022,7 +2841,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name to list logs for: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -2037,7 +2856,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * `:resourceNames` (*type:* `list(String.t)`) - Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `:resourceNames` (*type:* `list(String.t)`) - Optional. List of resource names to list logs for: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]The resource name in the parent field is added to this list. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -2083,7 +2902,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do end @doc """ - Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + Creates a sink that exports specified log entries to a destination. The export begins upon ingress, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. ## Parameters @@ -2101,7 +2920,8 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) used by the sinks with the same parent. For more information, see writer_identity in LogSink. * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2128,6 +2948,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :body => :body } @@ -2359,7 +3180,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do end @doc """ - Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field. + Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. ## Parameters @@ -2378,7 +3199,8 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) owned by Cloud Logging. It is an error if the old value is true and the new value is set to false or defaulted to false. * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2418,6 +3240,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :updateMask => :query, :body => :body @@ -2439,7 +3262,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do end @doc """ - Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field. + Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. ## Parameters @@ -2458,7 +3281,8 @@ defmodule GoogleApi.Logging.V2.Api.Folders do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) owned by Cloud Logging. It is an error if the old value is true and the new value is set to false or defaulted to false. * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2498,6 +3322,7 @@ defmodule GoogleApi.Logging.V2.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :updateMask => :query, :body => :body diff --git a/clients/logging/lib/google_api/logging/v2/api/locations.ex b/clients/logging/lib/google_api/logging/v2/api/locations.ex index f6c39be68b..492f99a8eb 100644 --- a/clients/logging/lib/google_api/logging/v2/api/locations.ex +++ b/clients/logging/lib/google_api/logging/v2/api/locations.ex @@ -192,7 +192,7 @@ defmodule GoogleApi.Logging.V2.Api.Locations do * `: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"). - * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. + * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -253,6 +253,88 @@ defmodule GoogleApi.Logging.V2.Api.Locations do |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogBucket{}]) end + @doc """ + Creates a log bucket asynchronously that can be used to store log entries.After a bucket has been created, the bucket's location cannot be changed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `v2_id` (*type:* `String.t`) - Part of `parent`. Required. The resource in which to create the log bucket: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example:"projects/my-project/locations/global" + * `v2_id1` (*type:* `String.t`) - Part of `parent`. See documentation of `v2Id`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `v2Id`. + * `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"). + * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_locations_buckets_create_async( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_locations_buckets_create_async( + connection, + v2_id, + v2_id1, + 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, + :bucketId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets:createAsync", %{ + "v2Id" => URI.encode(v2_id, &URI.char_unreserved?/1), + "v2Id1" => URI.encode(v2_id1, &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.Logging.V2.Model.Operation{}]) + end + @doc """ Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted. @@ -500,7 +582,7 @@ defmodule GoogleApi.Logging.V2.Api.Locations do end @doc """ - Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. + Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. ## Parameters @@ -669,6 +751,445 @@ defmodule GoogleApi.Logging.V2.Api.Locations do |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Empty{}]) end + @doc """ + Updates a log bucket asynchronously.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `v2_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the bucket to update. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" + * `v2_id1` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `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"). + * `:updateMask` (*type:* `String.t`) - Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_locations_buckets_update_async( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_locations_buckets_update_async( + connection, + v2_id, + v2_id1, + locations_id, + buckets_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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}:updateAsync", + %{ + "v2Id" => URI.encode(v2_id, &URI.char_unreserved?/1), + "v2Id1" => URI.encode(v2_id1, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_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.Logging.V2.Model.Operation{}]) + end + + @doc """ + Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currently only contain one link. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `v2_id` (*type:* `String.t`) - Part of `parent`. Required. The full resource name of the bucket to create a link for. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `v2_id1` (*type:* `String.t`) - Part of `parent`. See documentation of `v2Id`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `v2Id`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `v2Id`. + * `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"). + * `:linkId` (*type:* `String.t`) - Required. The ID to use for the link. The link_id can have up to 100 characters. A valid link_id must only have alphanumeric characters and underscores within it. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.Link.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_locations_buckets_links_create( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_locations_buckets_links_create( + connection, + v2_id, + v2_id1, + locations_id, + buckets_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, + :linkId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}/links", %{ + "v2Id" => URI.encode(v2_id, &URI.char_unreserved?/1), + "v2Id1" => URI.encode(v2_id1, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_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.Logging.V2.Model.Operation{}]) + end + + @doc """ + Deletes a link. This will also delete the corresponding BigQuery linked dataset. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `v2_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the link to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * `v2_id1` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `links_id` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `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.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_locations_buckets_links_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_locations_buckets_links_delete( + connection, + v2_id, + v2_id1, + locations_id, + buckets_id, + links_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(:delete) + |> Request.url( + "/v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}/links/{linksId}", + %{ + "v2Id" => URI.encode(v2_id, &URI.char_unreserved?/1), + "v2Id1" => URI.encode(v2_id1, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "linksId" => URI.encode(links_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.Logging.V2.Model.Operation{}]) + end + + @doc """ + Gets a link. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `v2_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the link: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * `v2_id1` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `links_id` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. + * `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.Logging.V2.Model.Link{}}` on success + * `{:error, info}` on failure + """ + @spec logging_locations_buckets_links_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Link.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_locations_buckets_links_get( + connection, + v2_id, + v2_id1, + locations_id, + buckets_id, + links_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( + "/v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}/links/{linksId}", + %{ + "v2Id" => URI.encode(v2_id, &URI.char_unreserved?/1), + "v2Id1" => URI.encode(v2_id1, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "linksId" => URI.encode(links_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.Logging.V2.Model.Link{}]) + end + + @doc """ + Lists links. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `v2_id` (*type:* `String.t`) - Part of `parent`. Required. The parent resource whose links are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `v2_id1` (*type:* `String.t`) - Part of `parent`. See documentation of `v2Id`. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `v2Id`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `v2Id`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListLinksResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_locations_buckets_links_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListLinksResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_locations_buckets_links_list( + connection, + v2_id, + v2_id1, + locations_id, + buckets_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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{v2Id}/{v2Id1}/locations/{locationsId}/buckets/{bucketsId}/links", %{ + "v2Id" => URI.encode(v2_id, &URI.char_unreserved?/1), + "v2Id1" => URI.encode(v2_id1, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_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.Logging.V2.Model.ListLinksResponse{}]) + end + @doc """ Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. @@ -845,7 +1366,7 @@ defmodule GoogleApi.Logging.V2.Api.Locations do end @doc """ - Gets a view on a log bucket.. + Gets a view on a log bucket. ## Parameters @@ -1020,7 +1541,7 @@ defmodule GoogleApi.Logging.V2.Api.Locations do end @doc """ - Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. + Updates a view on a log bucket. This method replaces the value of the filter field from the existing view with the corresponding value from the new view. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. ## Parameters @@ -1282,7 +1803,7 @@ defmodule GoogleApi.Logging.V2.Api.Locations do end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. ## Parameters diff --git a/clients/logging/lib/google_api/logging/v2/api/logs.ex b/clients/logging/lib/google_api/logging/v2/api/logs.ex index 66e4b0c040..ff084ee9cb 100644 --- a/clients/logging/lib/google_api/logging/v2/api/logs.ex +++ b/clients/logging/lib/google_api/logging/v2/api/logs.ex @@ -102,7 +102,7 @@ defmodule GoogleApi.Logging.V2.Api.Logs do ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `v2_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `v2_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name to list logs for: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] * `v2_id1` (*type:* `String.t`) - Part of `parent`. See documentation of `v2Id`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -118,7 +118,7 @@ defmodule GoogleApi.Logging.V2.Api.Logs do * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * `:resourceNames` (*type:* `list(String.t)`) - Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `:resourceNames` (*type:* `list(String.t)`) - Optional. List of resource names to list logs for: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]The resource name in the parent field is added to this list. * `opts` (*type:* `keyword()`) - Call options ## Returns diff --git a/clients/logging/lib/google_api/logging/v2/api/organizations.ex b/clients/logging/lib/google_api/logging/v2/api/organizations.ex index af4e5629cf..f0b5b56590 100644 --- a/clients/logging/lib/google_api/logging/v2/api/organizations.ex +++ b/clients/logging/lib/google_api/logging/v2/api/organizations.ex @@ -26,12 +26,12 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do @library_version Mix.Project.config() |> Keyword.get(:version, "") @doc """ - Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve CMEK settings. "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve CMEK settings. "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -96,12 +96,12 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do end @doc """ - Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Gets the settings for the given resource.Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts.See View default resource settings for Logging (https://cloud.google.com/logging/docs/default-settings#view-org-settings) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"organizations/12345/settings"Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"organizations/12345/settings"Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -161,7 +161,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do end @doc """ - Updates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.UpdateCmekSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Updates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.UpdateCmekSettings fails when any of the following are true: The value of kms_key_name is invalid. The associated service account doesn't have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access to the key is disabled.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. ## Parameters @@ -235,12 +235,12 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do end @doc """ - Updates the Log Router settings for the given resource.Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled. 4) location_id is not supported by Logging. 5) location_id violate OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Updates the settings for the given resource. This method applies to all feature configurations for organization and folders.UpdateSettings fails when any of the following are true: The value of storage_location either isn't supported by Logging or violates the location OrgPolicy. The default_sink_config field is set, but it has an unspecified filter write mode. The value of kms_key_name is invalid. The associated service account doesn't have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access to the key is disabled.See Configure default settings for organizations and folders (https://cloud.google.com/logging/docs/default-settings) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The resource name for the settings to update. "organizations/[ORGANIZATION_ID]/settings" For example:"organizations/12345/settings"Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The resource name for the settings to update. "organizations/[ORGANIZATION_ID]/settings" For example:"organizations/12345/settings" * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -845,7 +845,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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"). - * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. + * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -903,6 +903,87 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogBucket{}]) end + @doc """ + Creates a log bucket asynchronously that can be used to store log entries.After a bucket has been created, the bucket's location cannot be changed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The resource in which to create the log bucket: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example:"projects/my-project/locations/global" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `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"). + * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_organizations_locations_buckets_create_async( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_organizations_locations_buckets_create_async( + connection, + organizations_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, + :bucketId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets:createAsync", + %{ + "organizationsId" => URI.encode(organizations_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.Logging.V2.Model.Operation{}]) + end + @doc """ Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted. @@ -1144,7 +1225,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do end @doc """ - Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. + Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. ## Parameters @@ -1312,14 +1393,14 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do end @doc """ - Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. + Updates a log bucket asynchronously.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket in which to create the view `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example:"projects/my-project/locations/global/buckets/my-bucket" - * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. - * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the bucket to update. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1332,16 +1413,16 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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"). - * `:viewId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. - * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `:updateMask` (*type:* `String.t`) - Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_organizations_locations_buckets_views_create( + @spec logging_organizations_locations_buckets_update_async( Tesla.Env.client(), String.t(), String.t(), @@ -1349,11 +1430,11 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_organizations_locations_buckets_views_create( + def logging_organizations_locations_buckets_update_async( connection, organizations_id, locations_id, @@ -1373,7 +1454,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :viewId => :query, + :updateMask => :query, :body => :body } @@ -1381,7 +1462,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do Request.new() |> Request.method(:post) |> Request.url( - "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views", + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}:updateAsync", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), @@ -1393,19 +1474,18 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. + Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currently only contain one link. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to delete: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. - * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The full resource name of the bucket to create a link for. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1418,32 +1498,32 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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"). + * `:linkId` (*type:* `String.t`) - Required. The ID to use for the link. The link_id can have up to 100 characters. A valid link_id must only have alphanumeric characters and underscores within it. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.Link.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_organizations_locations_buckets_views_delete( + @spec logging_organizations_locations_buckets_links_create( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_organizations_locations_buckets_views_delete( + def logging_organizations_locations_buckets_links_create( connection, organizations_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1458,19 +1538,20 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :linkId => :query, + :body => :body } request = Request.new() - |> Request.method(:delete) + |> Request.method(:post) |> Request.url( - "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/links", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1478,19 +1559,19 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Empty{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Gets a view on a log bucket.. + Deletes a link. This will also delete the corresponding BigQuery linked dataset. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the policy: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the link to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `links_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1507,10 +1588,10 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_organizations_locations_buckets_views_get( + @spec logging_organizations_locations_buckets_links_delete( Tesla.Env.client(), String.t(), String.t(), @@ -1519,16 +1600,16 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_organizations_locations_buckets_views_get( + def logging_organizations_locations_buckets_links_delete( connection, organizations_id, locations_id, buckets_id, - views_id, + links_id, optional_params \\ [], opts \\ [] ) do @@ -1548,14 +1629,14 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do request = Request.new() - |> Request.method(:get) + |> Request.method(:delete) |> Request.url( - "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/links/{linksId}", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "linksId" => URI.encode(links_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1563,18 +1644,19 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Lists views on a log bucket. + Gets a link. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket whose views are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. - * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the link: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `links_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1587,32 +1669,32 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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"). - * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. - * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListViewsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Link{}}` on success * `{:error, info}` on failure """ - @spec logging_organizations_locations_buckets_views_list( + @spec logging_organizations_locations_buckets_links_get( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListViewsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.Link.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_organizations_locations_buckets_views_list( + def logging_organizations_locations_buckets_links_get( connection, organizations_id, locations_id, buckets_id, + links_id, optional_params \\ [], opts \\ [] ) do @@ -1627,20 +1709,19 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query + :upload_protocol => :query } request = Request.new() |> Request.method(:get) |> Request.url( - "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views", + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/links/{linksId}", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "linksId" => URI.encode(links_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1648,19 +1729,18 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListViewsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Link{}]) end @doc """ - Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. + Lists links. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to update "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. - * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The parent resource whose links are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1673,34 +1753,32 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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"). - * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter - * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.ListLinksResponse{}}` on success * `{:error, info}` on failure """ - @spec logging_organizations_locations_buckets_views_patch( + @spec logging_organizations_locations_buckets_links_list( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.ListLinksResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_organizations_locations_buckets_views_patch( + def logging_organizations_locations_buckets_links_list( connection, organizations_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1716,20 +1794,19 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :updateMask => :query, - :body => :body + :pageSize => :query, + :pageToken => :query } request = Request.new() - |> Request.method(:patch) + |> Request.method(:get) |> Request.url( - "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/links", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1737,19 +1814,18 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListLinksResponse{}]) end @doc """ - Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. + Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket in which to create the view `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example:"projects/my-project/locations/global/buckets/my-bucket" * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. - * `views_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1762,35 +1838,32 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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"). - * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. - * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * `:resourceNames` (*type:* `list(String.t)`) - Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `:viewId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListLogsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success * `{:error, info}` on failure """ - @spec logging_organizations_locations_buckets_views_logs_list( + @spec logging_organizations_locations_buckets_views_create( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListLogsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_organizations_locations_buckets_views_logs_list( + def logging_organizations_locations_buckets_views_create( connection, organizations_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1806,21 +1879,19 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query, - :resourceNames => :query + :viewId => :query, + :body => :body } request = Request.new() - |> Request.method(:get) + |> Request.method(:post) |> Request.url( - "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}/logs", + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1828,18 +1899,19 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListLogsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) end @doc """ - Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be cancelled. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to delete: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1852,7 +1924,6 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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.Logging.V2.Model.CancelOperationRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -1860,11 +1931,12 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec logging_organizations_locations_operations_cancel( + @spec logging_organizations_locations_buckets_views_delete( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: @@ -1872,11 +1944,12 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_organizations_locations_operations_cancel( + def logging_organizations_locations_buckets_views_delete( connection, organizations_id, locations_id, - operations_id, + buckets_id, + views_id, optional_params \\ [], opts \\ [] ) do @@ -1891,19 +1964,19 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :body => :body + :upload_protocol => :query } request = Request.new() - |> Request.method(:post) + |> Request.method(:delete) |> Request.url( - "/v2/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1915,14 +1988,15 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do end @doc """ - Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + Gets a view on a log bucket. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the policy: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1939,26 +2013,28 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success * `{:error, info}` on failure """ - @spec logging_organizations_locations_operations_get( + @spec logging_organizations_locations_buckets_views_get( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_organizations_locations_operations_get( + def logging_organizations_locations_buckets_views_get( connection, organizations_id, locations_id, - operations_id, + buckets_id, + views_id, optional_params \\ [], opts \\ [] ) do @@ -1980,11 +2056,12 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do Request.new() |> Request.method(:get) |> Request.url( - "/v2/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1992,17 +2069,18 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists views on a log bucket. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation's parent resource. - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket whose views are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -2015,31 +2093,32 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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 standard list filter. - * `:pageSize` (*type:* `integer()`) - The standard list page size. - * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListOperationsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.ListViewsResponse{}}` on success * `{:error, info}` on failure """ - @spec logging_organizations_locations_operations_list( + @spec logging_organizations_locations_buckets_views_list( Tesla.Env.client(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListOperationsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.ListViewsResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_organizations_locations_operations_list( + def logging_organizations_locations_buckets_views_list( connection, organizations_id, locations_id, + buckets_id, optional_params \\ [], opts \\ [] ) do @@ -2055,7 +2134,6 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :filter => :query, :pageSize => :query, :pageToken => :query } @@ -2063,16 +2141,769 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do request = Request.new() |> Request.method(:get) - |> Request.url("/v2/organizations/{organizationsId}/locations/{locationsId}/operations", %{ - "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), - "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1) - }) + |> Request.url( + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_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.Logging.V2.Model.ListOperationsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListViewsResponse{}]) + end + + @doc """ + Updates a view on a log bucket. This method replaces the value of the filter field from the existing view with the corresponding value from the new view. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to update "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `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"). + * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:error, info}` on failure + """ + @spec logging_organizations_locations_buckets_views_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_organizations_locations_buckets_views_patch( + connection, + organizations_id, + locations_id, + buckets_id, + views_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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.LogView{}]) + end + + @doc """ + Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name to list logs for: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `views_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `:resourceNames` (*type:* `list(String.t)`) - Optional. List of resource names to list logs for: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]The resource name in the parent field is added to this list. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListLogsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_organizations_locations_buckets_views_logs_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListLogsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_organizations_locations_buckets_views_logs_list( + connection, + organizations_id, + locations_id, + buckets_id, + views_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, + :pageSize => :query, + :pageToken => :query, + :resourceNames => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v2/organizations/{organizationsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}/logs", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.ListLogsResponse{}]) + end + + @doc """ + Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be cancelled. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `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.Logging.V2.Model.CancelOperationRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec logging_organizations_locations_operations_cancel( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_organizations_locations_operations_cancel( + connection, + organizations_id, + locations_id, + operations_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( + "/v2/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.Logging.V2.Model.Empty{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `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.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_organizations_locations_operations_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_organizations_locations_operations_get( + connection, + organizations_id, + locations_id, + operations_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( + "/v2/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.Logging.V2.Model.Operation{}]) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation's parent resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `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 standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_organizations_locations_operations_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_organizations_locations_operations_list( + connection, + organizations_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("/v2/organizations/{organizationsId}/locations/{locationsId}/operations", %{ + "organizationsId" => URI.encode(organizations_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.Logging.V2.Model.ListOperationsResponse{}]) + end + + @doc """ + Lists the RecentQueries that were created by the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The resource to which the listed queries belong. "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:projects/my-project/locations/us-central1Note: The location portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all recent queries. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListRecentQueriesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_organizations_locations_recent_queries_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListRecentQueriesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_organizations_locations_recent_queries_list( + connection, + organizations_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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v2/organizations/{organizationsId}/locations/{locationsId}/recentQueries", + %{ + "organizationsId" => URI.encode(organizations_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.Logging.V2.Model.ListRecentQueriesResponse{}]) + end + + @doc """ + Creates a new SavedQuery for the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The parent resource in which to create the saved query: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: "projects/my-project/locations/global" "organizations/123456789/locations/us-central1" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `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"). + * `:savedQueryId` (*type:* `String.t`) - Optional. The ID to use for the saved query, which will become the final component of the saved query's resource name.If the saved_query_id is not provided, the system will generate an alphanumeric ID.The saved_query_id is limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.SavedQuery.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.SavedQuery{}}` on success + * `{:error, info}` on failure + """ + @spec logging_organizations_locations_saved_queries_create( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.SavedQuery.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_organizations_locations_saved_queries_create( + connection, + organizations_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, + :savedQueryId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v2/organizations/{organizationsId}/locations/{locationsId}/savedQueries", + %{ + "organizationsId" => URI.encode(organizations_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.Logging.V2.Model.SavedQuery{}]) + end + + @doc """ + Deletes an existing SavedQuery that was created by the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the saved query to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For example: "projects/my-project/locations/global/savedQueries/my-saved-query" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `saved_queries_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `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.Logging.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec logging_organizations_locations_saved_queries_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_organizations_locations_saved_queries_delete( + connection, + organizations_id, + locations_id, + saved_queries_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(:delete) + |> Request.url( + "/v2/organizations/{organizationsId}/locations/{locationsId}/savedQueries/{savedQueriesId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "savedQueriesId" => + URI.encode(saved_queries_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.Logging.V2.Model.Empty{}]) + end + + @doc """ + Lists the SavedQueries that were created by the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The resource to which the listed queries belong. "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: "projects/my-project/locations/us-central1" Note: The locations portion of the resource must be specified. To get a list of all saved queries, a wildcard character - can be used for LOCATION_ID, for example: "projects/my-project/locations/-" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListSavedQueriesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_organizations_locations_saved_queries_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListSavedQueriesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_organizations_locations_saved_queries_list( + connection, + organizations_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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v2/organizations/{organizationsId}/locations/{locationsId}/savedQueries", + %{ + "organizationsId" => URI.encode(organizations_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.Logging.V2.Model.ListSavedQueriesResponse{}]) end @doc """ @@ -2155,7 +2986,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name to list logs for: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -2170,7 +3001,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * `:resourceNames` (*type:* `list(String.t)`) - Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `:resourceNames` (*type:* `list(String.t)`) - Optional. List of resource names to list logs for: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]The resource name in the parent field is added to this list. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -2221,7 +3052,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do end @doc """ - Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + Creates a sink that exports specified log entries to a destination. The export begins upon ingress, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. ## Parameters @@ -2239,7 +3070,8 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) used by the sinks with the same parent. For more information, see writer_identity in LogSink. * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2271,6 +3103,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :body => :body } @@ -2507,7 +3340,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do end @doc """ - Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field. + Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. ## Parameters @@ -2526,7 +3359,8 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) owned by Cloud Logging. It is an error if the old value is true and the new value is set to false or defaulted to false. * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2566,6 +3400,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :updateMask => :query, :body => :body @@ -2587,7 +3422,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do end @doc """ - Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field. + Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. ## Parameters @@ -2606,7 +3441,8 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) owned by Cloud Logging. It is an error if the old value is true and the new value is set to false or defaulted to false. * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2646,6 +3482,7 @@ defmodule GoogleApi.Logging.V2.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :updateMask => :query, :body => :body diff --git a/clients/logging/lib/google_api/logging/v2/api/projects.ex b/clients/logging/lib/google_api/logging/v2/api/projects.ex index f189a757b3..bb16ea17fb 100644 --- a/clients/logging/lib/google_api/logging/v2/api/projects.ex +++ b/clients/logging/lib/google_api/logging/v2/api/projects.ex @@ -26,12 +26,12 @@ defmodule GoogleApi.Logging.V2.Api.Projects do @library_version Mix.Project.config() |> Keyword.get(:version, "") @doc """ - Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve CMEK settings. "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve CMEK settings. "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -91,12 +91,12 @@ defmodule GoogleApi.Logging.V2.Api.Projects do end @doc """ - Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Gets the settings for the given resource.Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts.See View default resource settings for Logging (https://cloud.google.com/logging/docs/default-settings#view-org-settings) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"organizations/12345/settings"Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"organizations/12345/settings"Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -667,7 +667,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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"). - * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. + * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -725,6 +725,84 @@ defmodule GoogleApi.Logging.V2.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogBucket{}]) end + @doc """ + Creates a log bucket asynchronously that can be used to store log entries.After a bucket has been created, the bucket's location cannot be changed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource in which to create the log bucket: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example:"projects/my-project/locations/global" + * `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"). + * `:bucketId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_projects_locations_buckets_create_async( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_projects_locations_buckets_create_async( + 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, + :bucketId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/projects/{projectsId}/locations/{locationsId}/buckets:createAsync", %{ + "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.Logging.V2.Model.Operation{}]) + end + @doc """ Deletes a log bucket.Changes the bucket's lifecycle_state to the DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log entries in the bucket will be permanently deleted. @@ -960,7 +1038,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do end @doc """ - Updates a log bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retention_periodIf the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. + Updates a log bucket.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. ## Parameters @@ -1125,14 +1203,14 @@ defmodule GoogleApi.Logging.V2.Api.Projects do end @doc """ - Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. + Updates a log bucket asynchronously.If the bucket has a lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket has been created, the bucket's location cannot be changed. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket in which to create the view `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example:"projects/my-project/locations/global/buckets/my-bucket" - * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. - * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the bucket to update. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `buckets_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. @@ -1145,16 +1223,16 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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"). - * `:viewId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. - * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `:updateMask` (*type:* `String.t`) - Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_projects_locations_buckets_views_create( + @spec logging_projects_locations_buckets_update_async( Tesla.Env.client(), String.t(), String.t(), @@ -1162,11 +1240,11 @@ defmodule GoogleApi.Logging.V2.Api.Projects do keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_projects_locations_buckets_views_create( + def logging_projects_locations_buckets_update_async( connection, projects_id, locations_id, @@ -1186,7 +1264,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :viewId => :query, + :updateMask => :query, :body => :body } @@ -1194,7 +1272,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do Request.new() |> Request.method(:post) |> Request.url( - "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views", + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}:updateAsync", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), @@ -1206,19 +1284,18 @@ defmodule GoogleApi.Logging.V2.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. + Asynchronously creates a linked dataset in BigQuery which makes it possible to use BigQuery to read the logs stored in the log bucket. A log bucket may currently only contain one link. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to delete: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. - * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The full resource name of the bucket to create a link for. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `buckets_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. @@ -1231,32 +1308,32 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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"). + * `:linkId` (*type:* `String.t`) - Required. The ID to use for the link. The link_id can have up to 100 characters. A valid link_id must only have alphanumeric characters and underscores within it. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.Link.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_projects_locations_buckets_views_delete( + @spec logging_projects_locations_buckets_links_create( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_projects_locations_buckets_views_delete( + def logging_projects_locations_buckets_links_create( connection, projects_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1271,19 +1348,20 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :linkId => :query, + :body => :body } request = Request.new() - |> Request.method(:delete) + |> Request.method(:post) |> Request.url( - "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/links", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1291,19 +1369,19 @@ defmodule GoogleApi.Logging.V2.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Empty{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Gets a view on a log bucket.. + Deletes a link. This will also delete the corresponding BigQuery linked dataset. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the policy: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the link to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `links_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. @@ -1320,10 +1398,10 @@ defmodule GoogleApi.Logging.V2.Api.Projects do ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec logging_projects_locations_buckets_views_get( + @spec logging_projects_locations_buckets_links_delete( Tesla.Env.client(), String.t(), String.t(), @@ -1332,16 +1410,16 @@ defmodule GoogleApi.Logging.V2.Api.Projects do keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_projects_locations_buckets_views_get( + def logging_projects_locations_buckets_links_delete( connection, projects_id, locations_id, buckets_id, - views_id, + links_id, optional_params \\ [], opts \\ [] ) do @@ -1361,14 +1439,14 @@ defmodule GoogleApi.Logging.V2.Api.Projects do request = Request.new() - |> Request.method(:get) + |> Request.method(:delete) |> Request.url( - "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/links/{linksId}", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "linksId" => URI.encode(links_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1376,18 +1454,19 @@ defmodule GoogleApi.Logging.V2.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) end @doc """ - Lists views on a log bucket. + Gets a link. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket whose views are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. - * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the link: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `links_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. @@ -1400,32 +1479,32 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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"). - * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. - * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListViewsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.Link{}}` on success * `{:error, info}` on failure """ - @spec logging_projects_locations_buckets_views_list( + @spec logging_projects_locations_buckets_links_get( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListViewsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.Link.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_projects_locations_buckets_views_list( + def logging_projects_locations_buckets_links_get( connection, projects_id, locations_id, buckets_id, + links_id, optional_params \\ [], opts \\ [] ) do @@ -1440,20 +1519,19 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query + :upload_protocol => :query } request = Request.new() |> Request.method(:get) |> Request.url( - "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views", + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/links/{linksId}", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "linksId" => URI.encode(links_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1461,19 +1539,18 @@ defmodule GoogleApi.Logging.V2.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListViewsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Link{}]) end @doc """ - Updates a view on a log bucket. This method replaces the following fields in the existing view with values from the new view: filter. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. + Lists links. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to update "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. - * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. - * `views_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The parent resource whose links are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `buckets_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. @@ -1486,34 +1563,32 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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"). - * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter - * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.ListLinksResponse{}}` on success * `{:error, info}` on failure """ - @spec logging_projects_locations_buckets_views_patch( + @spec logging_projects_locations_buckets_links_list( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + {:ok, GoogleApi.Logging.V2.Model.ListLinksResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_projects_locations_buckets_views_patch( + def logging_projects_locations_buckets_links_list( connection, projects_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1529,20 +1604,19 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :updateMask => :query, - :body => :body + :pageSize => :query, + :pageToken => :query } request = Request.new() - |> Request.method(:patch) + |> Request.method(:get) |> Request.url( - "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/links", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1550,19 +1624,18 @@ defmodule GoogleApi.Logging.V2.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListLinksResponse{}]) end @doc """ - Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. + Creates a view over log entries in a log bucket. A bucket may contain a maximum of 30 views. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket in which to create the view `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` For example:"projects/my-project/locations/global/buckets/my-bucket" * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. - * `views_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. @@ -1575,35 +1648,32 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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"). - * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. - * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * `:resourceNames` (*type:* `list(String.t)`) - Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `:viewId` (*type:* `String.t`) - Required. A client-assigned identifier such as "my-view". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListLogsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success * `{:error, info}` on failure """ - @spec logging_projects_locations_buckets_views_logs_list( + @spec logging_projects_locations_buckets_views_create( Tesla.Env.client(), String.t(), String.t(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListLogsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_projects_locations_buckets_views_logs_list( + def logging_projects_locations_buckets_views_create( connection, projects_id, locations_id, buckets_id, - views_id, optional_params \\ [], opts \\ [] ) do @@ -1619,21 +1689,19 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query, - :resourceNames => :query + :viewId => :query, + :body => :body } request = Request.new() - |> Request.method(:get) + |> Request.method(:post) |> Request.url( - "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}/logs", + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), - "viewsId" => URI.encode(views_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1641,18 +1709,19 @@ defmodule GoogleApi.Logging.V2.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListLogsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.LogView{}]) end @doc """ - Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + Deletes a view on a log bucket. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can delete the view. If this occurs, please try again in a few minutes. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be cancelled. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to delete: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `views_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. @@ -1665,7 +1734,6 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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.Logging.V2.Model.CancelOperationRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -1673,11 +1741,12 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec logging_projects_locations_operations_cancel( + @spec logging_projects_locations_buckets_views_delete( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: @@ -1685,11 +1754,12 @@ defmodule GoogleApi.Logging.V2.Api.Projects do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_projects_locations_operations_cancel( + def logging_projects_locations_buckets_views_delete( connection, projects_id, locations_id, - operations_id, + buckets_id, + views_id, optional_params \\ [], opts \\ [] ) do @@ -1704,19 +1774,19 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :body => :body + :upload_protocol => :query } request = Request.new() - |> Request.method(:post) + |> Request.method(:delete) |> Request.url( - "/v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &URI.char_unreserved?/1) + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1728,14 +1798,15 @@ defmodule GoogleApi.Logging.V2.Api.Projects do end @doc """ - Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + Gets a view on a log bucket. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the policy: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `views_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. @@ -1752,26 +1823,539 @@ defmodule GoogleApi.Logging.V2.Api.Projects do ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.Operation{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success * `{:error, info}` on failure """ - @spec logging_projects_locations_operations_get( + @spec logging_projects_locations_buckets_views_get( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_projects_locations_operations_get( + def logging_projects_locations_buckets_views_get( + connection, + projects_id, + locations_id, + buckets_id, + views_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( + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.LogView{}]) + end + + @doc """ + Lists views on a log bucket. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The bucket whose views are to be listed: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `buckets_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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListViewsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_projects_locations_buckets_views_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListViewsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_projects_locations_buckets_views_list( + connection, + projects_id, + locations_id, + buckets_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, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_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.Logging.V2.Model.ListViewsResponse{}]) + end + + @doc """ + Updates a view on a log bucket. This method replaces the value of the filter field from the existing view with the corresponding value from the new view. If an UNAVAILABLE error is returned, this indicates that system is not in a state where it can update the view. If this occurs, please try again in a few minutes. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the view to update "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket/views/my-view" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `buckets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `views_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"). + * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in view that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter + * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogView.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.LogView{}}` on success + * `{:error, info}` on failure + """ + @spec logging_projects_locations_buckets_views_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.LogView.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_projects_locations_buckets_views_patch( + connection, + projects_id, + locations_id, + buckets_id, + views_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, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.LogView{}]) + end + + @doc """ + Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name to list logs for: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `buckets_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `views_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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `:resourceNames` (*type:* `list(String.t)`) - Optional. List of resource names to list logs for: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]The resource name in the parent field is added to this list. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListLogsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_projects_locations_buckets_views_logs_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListLogsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_projects_locations_buckets_views_logs_list( + connection, + projects_id, + locations_id, + buckets_id, + views_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, + :pageSize => :query, + :pageToken => :query, + :resourceNames => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v2/projects/{projectsId}/locations/{locationsId}/buckets/{bucketsId}/views/{viewsId}/logs", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "bucketsId" => URI.encode(buckets_id, &URI.char_unreserved?/1), + "viewsId" => URI.encode(views_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.Logging.V2.Model.ListLogsResponse{}]) + end + + @doc """ + Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be cancelled. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `operations_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.Logging.V2.Model.CancelOperationRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec logging_projects_locations_operations_cancel( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_projects_locations_operations_cancel( + connection, + projects_id, + locations_id, + operations_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( + "/v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.Logging.V2.Model.Empty{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `operations_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.Logging.V2.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec logging_projects_locations_operations_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_projects_locations_operations_get( + connection, + projects_id, + locations_id, + operations_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( + "/v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.Logging.V2.Model.Operation{}]) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. The name of the operation's parent resource. + * `locations_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 standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_projects_locations_operations_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_projects_locations_operations_list( connection, projects_id, locations_id, - operations_id, optional_params \\ [], opts \\ [] ) do @@ -1786,18 +2370,255 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/projects/{projectsId}/locations/{locationsId}/operations", %{ + "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.Logging.V2.Model.ListOperationsResponse{}]) + end + + @doc """ + Lists the RecentQueries that were created by the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource to which the listed queries belong. "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example:projects/my-project/locations/us-central1Note: The location portion of the resource must be specified, but supplying the character - in place of LOCATION_ID will return all recent queries. + * `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"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.ListRecentQueriesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec logging_projects_locations_recent_queries_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.ListRecentQueriesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_projects_locations_recent_queries_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, + :pageSize => :query, + :pageToken => :query } request = Request.new() |> Request.method(:get) + |> Request.url("/v2/projects/{projectsId}/locations/{locationsId}/recentQueries", %{ + "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.Logging.V2.Model.ListRecentQueriesResponse{}]) + end + + @doc """ + Creates a new SavedQuery for the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The parent resource in which to create the saved query: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: "projects/my-project/locations/global" "organizations/123456789/locations/us-central1" + * `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"). + * `:savedQueryId` (*type:* `String.t`) - Optional. The ID to use for the saved query, which will become the final component of the saved query's resource name.If the saved_query_id is not provided, the system will generate an alphanumeric ID.The saved_query_id is limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric. + * `:body` (*type:* `GoogleApi.Logging.V2.Model.SavedQuery.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Logging.V2.Model.SavedQuery{}}` on success + * `{:error, info}` on failure + """ + @spec logging_projects_locations_saved_queries_create( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.SavedQuery.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_projects_locations_saved_queries_create( + 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, + :savedQueryId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/projects/{projectsId}/locations/{locationsId}/savedQueries", %{ + "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.Logging.V2.Model.SavedQuery{}]) + end + + @doc """ + Deletes an existing SavedQuery that was created by the user making the request. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The full resource name of the saved query to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For example: "projects/my-project/locations/global/savedQueries/my-saved-query" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `saved_queries_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.Logging.V2.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec logging_projects_locations_saved_queries_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Logging.V2.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def logging_projects_locations_saved_queries_delete( + connection, + projects_id, + locations_id, + saved_queries_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(:delete) |> Request.url( - "/v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "/v2/projects/{projectsId}/locations/{locationsId}/savedQueries/{savedQueriesId}", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "savedQueriesId" => + URI.encode(saved_queries_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1805,17 +2626,17 @@ defmodule GoogleApi.Logging.V2.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Operation{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.Empty{}]) end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists the SavedQueries that were created by the user making the request. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. The name of the operation's parent resource. - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource to which the listed queries belong. "projects/[PROJECT_ID]/locations/[LOCATION_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: "projects/my-project/locations/us-central1" Note: The locations portion of the resource must be specified. To get a list of all saved queries, a wildcard character - can be used for LOCATION_ID, for example: "projects/my-project/locations/-" + * `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. @@ -1828,28 +2649,27 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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 standard list filter. - * `:pageSize` (*type:* `integer()`) - The standard list page size. - * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. + * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Logging.V2.Model.ListOperationsResponse{}}` on success + * `{:ok, %GoogleApi.Logging.V2.Model.ListSavedQueriesResponse{}}` on success * `{:error, info}` on failure """ - @spec logging_projects_locations_operations_list( + @spec logging_projects_locations_saved_queries_list( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.Logging.V2.Model.ListOperationsResponse.t()} + {:ok, GoogleApi.Logging.V2.Model.ListSavedQueriesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def logging_projects_locations_operations_list( + def logging_projects_locations_saved_queries_list( connection, projects_id, locations_id, @@ -1868,7 +2688,6 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :filter => :query, :pageSize => :query, :pageToken => :query } @@ -1876,7 +2695,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do request = Request.new() |> Request.method(:get) - |> Request.url("/v2/projects/{projectsId}/locations/{locationsId}/operations", %{ + |> Request.url("/v2/projects/{projectsId}/locations/{locationsId}/savedQueries", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1) }) @@ -1885,7 +2704,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListOperationsResponse{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.Logging.V2.Model.ListSavedQueriesResponse{}]) end @doc """ @@ -1968,7 +2787,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name that owns the logs: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name to list logs for: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1983,7 +2802,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of results to return from this request. Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available. * `:pageToken` (*type:* `String.t`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call. - * `:resourceNames` (*type:* `list(String.t)`) - Optional. The resource name that owns the logs: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID] + * `:resourceNames` (*type:* `list(String.t)`) - Optional. List of resource names to list logs for: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]To support legacy queries, it could also be: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]The resource name in the parent field is added to this list. * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -2379,7 +3198,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do end @doc """ - Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + Creates a sink that exports specified log entries to a destination. The export begins upon ingress, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. ## Parameters @@ -2397,7 +3216,8 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) used by the sinks with the same parent. For more information, see writer_identity in LogSink. * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2424,6 +3244,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :body => :body } @@ -2655,7 +3476,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do end @doc """ - Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field. + Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. ## Parameters @@ -2674,7 +3495,8 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) owned by Cloud Logging. It is an error if the old value is true and the new value is set to false or defaulted to false. * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2714,6 +3536,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :updateMask => :query, :body => :body @@ -2735,7 +3558,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do end @doc """ - Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field. + Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. ## Parameters @@ -2754,7 +3577,8 @@ defmodule GoogleApi.Logging.V2.Api.Projects do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) owned by Cloud Logging. It is an error if the old value is true and the new value is set to false or defaulted to false. * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2794,6 +3618,7 @@ defmodule GoogleApi.Logging.V2.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :updateMask => :query, :body => :body diff --git a/clients/logging/lib/google_api/logging/v2/api/sinks.ex b/clients/logging/lib/google_api/logging/v2/api/sinks.ex index 485016c61c..3906a49cd2 100644 --- a/clients/logging/lib/google_api/logging/v2/api/sinks.ex +++ b/clients/logging/lib/google_api/logging/v2/api/sinks.ex @@ -26,7 +26,7 @@ defmodule GoogleApi.Logging.V2.Api.Sinks do @library_version Mix.Project.config() |> Keyword.get(:version, "") @doc """ - Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + Creates a sink that exports specified log entries to a destination. The export begins upon ingress, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. ## Parameters @@ -45,7 +45,8 @@ defmodule GoogleApi.Logging.V2.Api.Sinks do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a unique service account used only for exports from the new sink. For more information, see writer_identity in LogSink. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. Determines the kind of IAM identity returned as writer_identity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writer_identity is the same group or service account used by Cloud Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writer_identity will be a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) used by the sinks with the same parent. For more information, see writer_identity in LogSink. * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -72,6 +73,7 @@ defmodule GoogleApi.Logging.V2.Api.Sinks do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :body => :body } @@ -300,7 +302,7 @@ defmodule GoogleApi.Logging.V2.Api.Sinks do end @doc """ - Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter.The updated sink might also have a new writer_identity; see the unique_writer_identity field. + Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. ## Parameters @@ -320,7 +322,8 @@ defmodule GoogleApi.Logging.V2.Api.Sinks do * `: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"). - * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a unique service account. It is an error if the old value is true and the new value is set to false or defaulted to false. + * `:customWriterIdentity` (*type:* `String.t`) - Optional. A service account provided by the caller that will be used to write the log entries. The format must be serviceAccount:some@email. This field can only be specified if you are routing logs to a destination outside this sink's project. If not specified, a Logging service account will automatically be generated. + * `:uniqueWriterIdentity` (*type:* `boolean()`) - Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writer_identity in the updated sink depends on both the old and new values of this field: If the old and new values of this field are both false or both true, then there is no change to the sink's writer_identity. If the old value is false and the new value is true, then writer_identity is changed to a service agent (https://cloud.google.com/iam/docs/service-account-types#service-agents) owned by Cloud Logging. It is an error if the old value is true and the new value is set to false or defaulted to false. * `:updateMask` (*type:* `String.t`) - Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes:destination,filter,includeChildrenAt some point in the future, behavior will be removed and specifying an empty updateMask will be an error.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=filter * `:body` (*type:* `GoogleApi.Logging.V2.Model.LogSink.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -355,6 +358,7 @@ defmodule GoogleApi.Logging.V2.Api.Sinks do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :customWriterIdentity => :query, :uniqueWriterIdentity => :query, :updateMask => :query, :body => :body diff --git a/clients/logging/lib/google_api/logging/v2/api/v2.ex b/clients/logging/lib/google_api/logging/v2/api/v2.ex index 1c0dffe6f7..77dcf0df41 100644 --- a/clients/logging/lib/google_api/logging/v2/api/v2.ex +++ b/clients/logging/lib/google_api/logging/v2/api/v2.ex @@ -26,12 +26,12 @@ defmodule GoogleApi.Logging.V2.Api.V2 do @library_version Mix.Project.config() |> Keyword.get(:version, "") @doc """ - Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `v2_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve CMEK settings. "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. + * `v2_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve CMEK settings. "projects/[PROJECT_ID]/cmekSettings" "organizations/[ORGANIZATION_ID]/cmekSettings" "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" "folders/[FOLDER_ID]/cmekSettings" For example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can be configured for Google Cloud projects, folders, organizations, and billing accounts. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. * `v2_id1` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -94,12 +94,12 @@ defmodule GoogleApi.Logging.V2.Api.V2 do end @doc """ - Gets the Log Router settings for the given resource.Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Gets the settings for the given resource.Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts.See View default resource settings for Logging (https://cloud.google.com/logging/docs/default-settings#view-org-settings) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `v2_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"organizations/12345/settings"Note: Settings for the Log Router can be get for Google Cloud projects, folders, organizations and billing accounts. Currently it can only be configured for organizations. Once configured for an organization, it applies to all projects and folders in the Google Cloud organization. + * `v2_id` (*type:* `String.t`) - Part of `name`. Required. The resource for which to retrieve settings. "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings" "billingAccounts/[BILLING_ACCOUNT_ID]/settings" "folders/[FOLDER_ID]/settings" For example:"organizations/12345/settings"Note: Settings can be retrieved for Google Cloud projects, folders, organizations, and billing accounts. * `v2_id1` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -156,7 +156,7 @@ defmodule GoogleApi.Logging.V2.Api.V2 do end @doc """ - Updates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.UpdateCmekSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Updates the Log Router CMEK settings for the given resource.Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.UpdateCmekSettings fails when any of the following are true: The value of kms_key_name is invalid. The associated service account doesn't have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access to the key is disabled.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. ## Parameters @@ -228,12 +228,12 @@ defmodule GoogleApi.Logging.V2.Api.V2 do end @doc """ - Updates the Log Router settings for the given resource.Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.UpdateSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled. 4) location_id is not supported by Logging. 5) location_id violate OrgPolicy.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + Updates the settings for the given resource. This method applies to all feature configurations for organization and folders.UpdateSettings fails when any of the following are true: The value of storage_location either isn't supported by Logging or violates the location OrgPolicy. The default_sink_config field is set, but it has an unspecified filter write mode. The value of kms_key_name is invalid. The associated service account doesn't have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access to the key is disabled.See Configure default settings for organizations and folders (https://cloud.google.com/logging/docs/default-settings) for more information. ## Parameters * `connection` (*type:* `GoogleApi.Logging.V2.Connection.t`) - Connection to server - * `v2_id` (*type:* `String.t`) - Part of `name`. Required. The resource name for the settings to update. "organizations/[ORGANIZATION_ID]/settings" For example:"organizations/12345/settings"Note: Settings for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization. + * `v2_id` (*type:* `String.t`) - Part of `name`. Required. The resource name for the settings to update. "organizations/[ORGANIZATION_ID]/settings" For example:"organizations/12345/settings" * `v2_id1` (*type:* `String.t`) - Part of `name`. See documentation of `v2Id`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. diff --git a/clients/logging/lib/google_api/logging/v2/metadata.ex b/clients/logging/lib/google_api/logging/v2/metadata.ex index ae73cb468b..2d650dc8d8 100644 --- a/clients/logging/lib/google_api/logging/v2/metadata.ex +++ b/clients/logging/lib/google_api/logging/v2/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Logging.V2 do API client metadata for GoogleApi.Logging.V2. """ - @discovery_revision "20220922" + @discovery_revision "20240301" def discovery_revision(), do: @discovery_revision end diff --git a/clients/logging/lib/google_api/logging/v2/model/big_query_dataset.ex b/clients/logging/lib/google_api/logging/v2/model/big_query_dataset.ex new file mode 100644 index 0000000000..91b213c84c --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/big_query_dataset.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.Logging.V2.Model.BigQueryDataset do + @moduledoc """ + Describes a BigQuery dataset that was created by a link. + + ## Attributes + + * `datasetId` (*type:* `String.t`, *default:* `nil`) - Output only. The full resource name of the BigQuery dataset. The DATASET_ID will match the ID of the link, so the link must match the naming restrictions of BigQuery datasets (alphanumeric characters and underscores only).The dataset will have a resource path of "bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :datasetId => String.t() | nil + } + + field(:datasetId) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.BigQueryDataset do + def decode(value, options) do + GoogleApi.Logging.V2.Model.BigQueryDataset.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.BigQueryDataset do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/big_query_options.ex b/clients/logging/lib/google_api/logging/v2/model/big_query_options.ex index b05277ae05..c2f49ac047 100644 --- a/clients/logging/lib/google_api/logging/v2/model/big_query_options.ex +++ b/clients/logging/lib/google_api/logging/v2/model/big_query_options.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.Logging.V2.Model.BigQueryOptions do ## Attributes * `usePartitionedTables` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether to use BigQuery's partition tables (https://cloud.google.com/bigquery/docs/partitioned-tables). By default, Cloud Logging creates dated tables based on the log entries' timestamps, e.g. syslog_20170523. With partitioned tables the date suffix is no longer present and special query syntax (https://cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used instead. In both cases, tables are sharded based on UTC timezone. - * `usesTimestampColumnPartitioning` (*type:* `boolean()`, *default:* `nil`) - Output only. True if new timestamp column based partitioning is in use, false if legacy ingestion-time partitioning is in use.All new sinks will have this field set true and will use timestamp column based partitioning. If use_partitioned_tables is false, this value has no meaning and will be false. Legacy sinks using partitioned tables will have this field set to false. + * `usesTimestampColumnPartitioning` (*type:* `boolean()`, *default:* `nil`) - Output only. True if new timestamp column based partitioning is in use, false if legacy ingress-time partitioning is in use.All new sinks will have this field set true and will use timestamp column based partitioning. If use_partitioned_tables is false, this value has no meaning and will be false. Legacy sinks using partitioned tables will have this field set to false. """ use GoogleApi.Gax.ModelBase diff --git a/clients/logging/lib/google_api/logging/v2/model/bucket_metadata.ex b/clients/logging/lib/google_api/logging/v2/model/bucket_metadata.ex new file mode 100644 index 0000000000..3f710c0d0d --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/bucket_metadata.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.Logging.V2.Model.BucketMetadata do + @moduledoc """ + Metadata for LongRunningUpdateBucket Operations. + + ## Attributes + + * `createBucketRequest` (*type:* `GoogleApi.Logging.V2.Model.CreateBucketRequest.t`, *default:* `nil`) - LongRunningCreateBucket RPC request. + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - The end time of an operation. + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - The create time of an operation. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of an operation. + * `updateBucketRequest` (*type:* `GoogleApi.Logging.V2.Model.UpdateBucketRequest.t`, *default:* `nil`) - LongRunningUpdateBucket RPC request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createBucketRequest => GoogleApi.Logging.V2.Model.CreateBucketRequest.t() | nil, + :endTime => DateTime.t() | nil, + :startTime => DateTime.t() | nil, + :state => String.t() | nil, + :updateBucketRequest => GoogleApi.Logging.V2.Model.UpdateBucketRequest.t() | nil + } + + field(:createBucketRequest, as: GoogleApi.Logging.V2.Model.CreateBucketRequest) + field(:endTime, as: DateTime) + field(:startTime, as: DateTime) + field(:state) + field(:updateBucketRequest, as: GoogleApi.Logging.V2.Model.UpdateBucketRequest) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.BucketMetadata do + def decode(value, options) do + GoogleApi.Logging.V2.Model.BucketMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.BucketMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/cmek_settings.ex b/clients/logging/lib/google_api/logging/v2/model/cmek_settings.ex index 8a47dd345d..ead91c90fb 100644 --- a/clients/logging/lib/google_api/logging/v2/model/cmek_settings.ex +++ b/clients/logging/lib/google_api/logging/v2/model/cmek_settings.ex @@ -21,8 +21,8 @@ defmodule GoogleApi.Logging.V2.Model.CmekSettings do ## Attributes - * `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - The resource name for the configured Cloud KMS key.KMS key name format: "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" For example:"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"To enable CMEK for the Log Router, set this field to a valid kms_key_name for which the associated service account has the required cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.The Cloud KMS key used by the Log Router can be updated by changing the kms_key_name to a new valid key name or disabled by setting the key name to an empty string. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.To disable CMEK for the Log Router, set this field to an empty string.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. - * `kmsKeyVersionName` (*type:* `String.t`, *default:* `nil`) - The CryptoKeyVersion resource name for the configured Cloud KMS key.KMS key name format: "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" For example:"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version. + * `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - Optional. The resource name for the configured Cloud KMS key.KMS key name format: "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" For example:"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"To enable CMEK for the Log Router, set this field to a valid kms_key_name for which the associated service account has the needed cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key.The Cloud KMS key used by the Log Router can be updated by changing the kms_key_name to a new valid key name or disabled by setting the key name to an empty string. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.To disable CMEK for the Log Router, set this field to an empty string.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * `kmsKeyVersionName` (*type:* `String.t`, *default:* `nil`) - Output only. The CryptoKeyVersion resource name for the configured Cloud KMS key.KMS key name format: "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" For example:"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"This is a read-only field used to convey the specific configured CryptoKeyVersion of kms_key that has been configured. It will be populated in cases where the CMEK settings are bound to a single key version.If this field is populated, the kms_key is tied to a specific CryptoKeyVersion. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the CMEK settings. * `serviceAccountId` (*type:* `String.t`, *default:* `nil`) - Output only. The service account that will be used by the Log Router to access your Cloud KMS key.Before enabling CMEK for Log Router, you must first assign the cloudkms.cryptoKeyEncrypterDecrypter role to the service account that the Log Router will use to access your Cloud KMS key. Use GetCmekSettings to obtain the service account ID.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. """ diff --git a/clients/logging/lib/google_api/logging/v2/model/copy_log_entries_metadata.ex b/clients/logging/lib/google_api/logging/v2/model/copy_log_entries_metadata.ex index ecf6dd4f29..a736d2dcdf 100644 --- a/clients/logging/lib/google_api/logging/v2/model/copy_log_entries_metadata.ex +++ b/clients/logging/lib/google_api/logging/v2/model/copy_log_entries_metadata.ex @@ -22,11 +22,14 @@ defmodule GoogleApi.Logging.V2.Model.CopyLogEntriesMetadata do ## Attributes * `cancellationRequested` (*type:* `boolean()`, *default:* `nil`) - Identifies whether the user has requested cancellation of the operation. + * `destination` (*type:* `String.t`, *default:* `nil`) - Destination to which to copy log entries.For example, a Cloud Storage bucket:"storage.googleapis.com/my-cloud-storage-bucket" * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - The end time of an operation. * `progress` (*type:* `integer()`, *default:* `nil`) - Estimated progress of the operation (0 - 100%). - * `request` (*type:* `GoogleApi.Logging.V2.Model.CopyLogEntriesRequest.t`, *default:* `nil`) - CopyLogEntries RPC request. + * `request` (*type:* `GoogleApi.Logging.V2.Model.CopyLogEntriesRequest.t`, *default:* `nil`) - CopyLogEntries RPC request. This field is deprecated and not used. + * `source` (*type:* `String.t`, *default:* `nil`) - Source from which to copy log entries.For example, a log bucket:"projects/my-project/locations/global/buckets/my-source-bucket" * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - The create time of an operation. - * `state` (*type:* `String.t`, *default:* `nil`) - State of an operation. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of an operation. + * `verb` (*type:* `String.t`, *default:* `nil`) - Name of the verb executed by the operation.For example,"copy" * `writerIdentity` (*type:* `String.t`, *default:* `nil`) - The IAM identity of a service account that must be granted access to the destination.If the service account is not granted permission to the destination within an hour, the operation will be cancelled.For example: "serviceAccount:foo@bar.com" """ @@ -34,20 +37,26 @@ defmodule GoogleApi.Logging.V2.Model.CopyLogEntriesMetadata do @type t :: %__MODULE__{ :cancellationRequested => boolean() | nil, + :destination => String.t() | nil, :endTime => DateTime.t() | nil, :progress => integer() | nil, :request => GoogleApi.Logging.V2.Model.CopyLogEntriesRequest.t() | nil, + :source => String.t() | nil, :startTime => DateTime.t() | nil, :state => String.t() | nil, + :verb => String.t() | nil, :writerIdentity => String.t() | nil } field(:cancellationRequested) + field(:destination) field(:endTime, as: DateTime) field(:progress) field(:request, as: GoogleApi.Logging.V2.Model.CopyLogEntriesRequest) + field(:source) field(:startTime, as: DateTime) field(:state) + field(:verb) field(:writerIdentity) end diff --git a/clients/logging/lib/google_api/logging/v2/model/create_bucket_request.ex b/clients/logging/lib/google_api/logging/v2/model/create_bucket_request.ex new file mode 100644 index 0000000000..c53a4679f5 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/create_bucket_request.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.Logging.V2.Model.CreateBucketRequest do + @moduledoc """ + The parameters to CreateBucket. + + ## Attributes + + * `bucket` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`, *default:* `nil`) - Required. The new bucket. The region specified in the new bucket must be compliant with any Location Restriction Org Policy. The name field in the bucket is ignored. + * `bucketId` (*type:* `String.t`, *default:* `nil`) - Required. A client-assigned identifier such as "my-bucket". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. Bucket identifiers must start with an alphanumeric character. + * `parent` (*type:* `String.t`, *default:* `nil`) - Required. The resource in which to create the log bucket: "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example:"projects/my-project/locations/global" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :bucket => GoogleApi.Logging.V2.Model.LogBucket.t() | nil, + :bucketId => String.t() | nil, + :parent => String.t() | nil + } + + field(:bucket, as: GoogleApi.Logging.V2.Model.LogBucket) + field(:bucketId) + field(:parent) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.CreateBucketRequest do + def decode(value, options) do + GoogleApi.Logging.V2.Model.CreateBucketRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.CreateBucketRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/create_link_request.ex b/clients/logging/lib/google_api/logging/v2/model/create_link_request.ex new file mode 100644 index 0000000000..86180a4576 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/create_link_request.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.Logging.V2.Model.CreateLinkRequest do + @moduledoc """ + The parameters to CreateLink. + + ## Attributes + + * `link` (*type:* `GoogleApi.Logging.V2.Model.Link.t`, *default:* `nil`) - Required. The new link. + * `linkId` (*type:* `String.t`, *default:* `nil`) - Required. The ID to use for the link. The link_id can have up to 100 characters. A valid link_id must only have alphanumeric characters and underscores within it. + * `parent` (*type:* `String.t`, *default:* `nil`) - Required. The full resource name of the bucket to create a link for. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :link => GoogleApi.Logging.V2.Model.Link.t() | nil, + :linkId => String.t() | nil, + :parent => String.t() | nil + } + + field(:link, as: GoogleApi.Logging.V2.Model.Link) + field(:linkId) + field(:parent) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.CreateLinkRequest do + def decode(value, options) do + GoogleApi.Logging.V2.Model.CreateLinkRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.CreateLinkRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/default_sink_config.ex b/clients/logging/lib/google_api/logging/v2/model/default_sink_config.ex new file mode 100644 index 0000000000..4ce19aa921 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/default_sink_config.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.Logging.V2.Model.DefaultSinkConfig do + @moduledoc """ + Describes the custom _Default sink configuration that is used to override the built-in _Default sink configuration in newly created resource containers, such as projects or folders. + + ## Attributes + + * `exclusions` (*type:* `list(GoogleApi.Logging.V2.Model.LogExclusion.t)`, *default:* `nil`) - Optional. Specifies the set of exclusions to be added to the _Default sink in newly created resource containers. + * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-queries). The only exported log entries are those that are in the resource owning the sink and that match the filter.For example:logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERRORTo match all logs, don't add exclusions and use the following line as the value of filter:logName:*Cannot be empty or unset when the value of mode is OVERWRITE. + * `mode` (*type:* `String.t`, *default:* `nil`) - Required. Determines the behavior to apply to the built-in _Default sink inclusion filter.Exclusions are always appended, as built-in _Default sinks have no exclusions. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :exclusions => list(GoogleApi.Logging.V2.Model.LogExclusion.t()) | nil, + :filter => String.t() | nil, + :mode => String.t() | nil + } + + field(:exclusions, as: GoogleApi.Logging.V2.Model.LogExclusion, type: :list) + field(:filter) + field(:mode) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.DefaultSinkConfig do + def decode(value, options) do + GoogleApi.Logging.V2.Model.DefaultSinkConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.DefaultSinkConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/delete_link_request.ex b/clients/logging/lib/google_api/logging/v2/model/delete_link_request.ex new file mode 100644 index 0000000000..5fd3d64327 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/delete_link_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.Logging.V2.Model.DeleteLinkRequest do + @moduledoc """ + The parameters to DeleteLink. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The full resource name of the link to delete. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil + } + + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.DeleteLinkRequest do + def decode(value, options) do + GoogleApi.Logging.V2.Model.DeleteLinkRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.DeleteLinkRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/exponential.ex b/clients/logging/lib/google_api/logging/v2/model/exponential.ex index 42da916127..1f62d5e4ed 100644 --- a/clients/logging/lib/google_api/logging/v2/model/exponential.ex +++ b/clients/logging/lib/google_api/logging/v2/model/exponential.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.Logging.V2.Model.Exponential do @moduledoc """ - Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). + Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). ## Attributes diff --git a/clients/logging/lib/google_api/logging/v2/model/http_request.ex b/clients/logging/lib/google_api/logging/v2/model/http_request.ex index 0f13c23ad5..33769201bc 100644 --- a/clients/logging/lib/google_api/logging/v2/model/http_request.ex +++ b/clients/logging/lib/google_api/logging/v2/model/http_request.ex @@ -27,7 +27,7 @@ defmodule GoogleApi.Logging.V2.Model.HttpRequest do * `cacheValidatedWithOriginServer` (*type:* `boolean()`, *default:* `nil`) - Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if cache_hit is True. * `latency` (*type:* `String.t`, *default:* `nil`) - The request processing latency on the server, from the time the request was received until the response was sent. * `protocol` (*type:* `String.t`, *default:* `nil`) - Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" - * `referer` (*type:* `String.t`, *default:* `nil`) - The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + * `referer` (*type:* `String.t`, *default:* `nil`) - The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (https://datatracker.ietf.org/doc/html/rfc2616#section-14.36). * `remoteIp` (*type:* `String.t`, *default:* `nil`) - The IP address (IPv4 or IPv6) of the client that issued the HTTP request. This field can include port information. Examples: "192.168.1.1", "10.0.0.1:80", "FE80::0202:B3FF:FE1E:8329". * `requestMethod` (*type:* `String.t`, *default:* `nil`) - The request method. Examples: "GET", "HEAD", "PUT", "POST". * `requestSize` (*type:* `String.t`, *default:* `nil`) - The size of the HTTP request message in bytes, including the request headers and the request body. diff --git a/clients/logging/lib/google_api/logging/v2/model/linear.ex b/clients/logging/lib/google_api/logging/v2/model/linear.ex index 19b1404271..780200d178 100644 --- a/clients/logging/lib/google_api/logging/v2/model/linear.ex +++ b/clients/logging/lib/google_api/logging/v2/model/linear.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.Logging.V2.Model.Linear do @moduledoc """ - Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)). + Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): offset + (width * i).Lower bound (1 <= i < N): offset + (width * (i - 1)). ## Attributes diff --git a/clients/logging/lib/google_api/logging/v2/model/link.ex b/clients/logging/lib/google_api/logging/v2/model/link.ex new file mode 100644 index 0000000000..4e93859d72 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/link.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.Logging.V2.Model.Link do + @moduledoc """ + Describes a link connected to an analytics enabled bucket. + + ## Attributes + + * `bigqueryDataset` (*type:* `GoogleApi.Logging.V2.Model.BigQueryDataset.t`, *default:* `nil`) - Optional. The information of a BigQuery Dataset. When a link is created, a BigQuery dataset is created along with it, in the same project as the LogBucket it's linked to. This dataset will also have BigQuery Views corresponding to the LogViews in the bucket. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The creation timestamp of the link. + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. Describes this link.The maximum length of the description is 8000 characters. + * `lifecycleState` (*type:* `String.t`, *default:* `nil`) - Output only. The resource lifecycle state. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the link. The name can have up to 100 characters. A valid link id (at the end of the link name) must only have alphanumeric characters and underscores within it. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" For example:`projects/my-project/locations/global/buckets/my-bucket/links/my_link + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :bigqueryDataset => GoogleApi.Logging.V2.Model.BigQueryDataset.t() | nil, + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :lifecycleState => String.t() | nil, + :name => String.t() | nil + } + + field(:bigqueryDataset, as: GoogleApi.Logging.V2.Model.BigQueryDataset) + field(:createTime, as: DateTime) + field(:description) + field(:lifecycleState) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.Link do + def decode(value, options) do + GoogleApi.Logging.V2.Model.Link.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.Link do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/link_metadata.ex b/clients/logging/lib/google_api/logging/v2/model/link_metadata.ex new file mode 100644 index 0000000000..c76dadb79c --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/link_metadata.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.Logging.V2.Model.LinkMetadata do + @moduledoc """ + Metadata for long running Link operations. + + ## Attributes + + * `createLinkRequest` (*type:* `GoogleApi.Logging.V2.Model.CreateLinkRequest.t`, *default:* `nil`) - CreateLink RPC request. + * `deleteLinkRequest` (*type:* `GoogleApi.Logging.V2.Model.DeleteLinkRequest.t`, *default:* `nil`) - DeleteLink RPC request. + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - The end time of an operation. + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - The start time of an operation. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of an operation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createLinkRequest => GoogleApi.Logging.V2.Model.CreateLinkRequest.t() | nil, + :deleteLinkRequest => GoogleApi.Logging.V2.Model.DeleteLinkRequest.t() | nil, + :endTime => DateTime.t() | nil, + :startTime => DateTime.t() | nil, + :state => String.t() | nil + } + + field(:createLinkRequest, as: GoogleApi.Logging.V2.Model.CreateLinkRequest) + field(:deleteLinkRequest, as: GoogleApi.Logging.V2.Model.DeleteLinkRequest) + field(:endTime, as: DateTime) + field(:startTime, as: DateTime) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.LinkMetadata do + def decode(value, options) do + GoogleApi.Logging.V2.Model.LinkMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.LinkMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/list_links_response.ex b/clients/logging/lib/google_api/logging/v2/model/list_links_response.ex new file mode 100644 index 0000000000..2f4576ff05 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/list_links_response.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.Logging.V2.Model.ListLinksResponse do + @moduledoc """ + The response from ListLinks. + + ## Attributes + + * `links` (*type:* `list(GoogleApi.Logging.V2.Model.Link.t)`, *default:* `nil`) - A list of links. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - If there might be more results than those appearing in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :links => list(GoogleApi.Logging.V2.Model.Link.t()) | nil, + :nextPageToken => String.t() | nil + } + + field(:links, as: GoogleApi.Logging.V2.Model.Link, type: :list) + field(:nextPageToken) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.ListLinksResponse do + def decode(value, options) do + GoogleApi.Logging.V2.Model.ListLinksResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.ListLinksResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/list_log_entries_request.ex b/clients/logging/lib/google_api/logging/v2/model/list_log_entries_request.ex index 3205b50bba..9197dda273 100644 --- a/clients/logging/lib/google_api/logging/v2/model/list_log_entries_request.ex +++ b/clients/logging/lib/google_api/logging/v2/model/list_log_entries_request.ex @@ -21,12 +21,12 @@ defmodule GoogleApi.Logging.V2.Model.ListLogEntriesRequest do ## Attributes - * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. A filter that chooses which log entries to return. See Advanced Logs Queries (https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters. + * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. A filter that chooses which log entries to return. For more information, see Logging query language (https://cloud.google.com/logging/docs/view/logging-query-language).Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of a filter is 20,000 characters. * `orderBy` (*type:* `String.t`, *default:* `nil`) - Optional. How the results should be sorted. Presently, the only permitted values are "timestamp asc" (default) and "timestamp desc". The first option returns entries in order of increasing values of LogEntry.timestamp (oldest first), and the second option returns entries in order of decreasing timestamps (newest first). Entries with equal timestamps are returned in order of their insert_id values. - * `pageSize` (*type:* `integer()`, *default:* `nil`) - Optional. The maximum number of results to return from this request. Default is 50. If the value is negative or exceeds 1000, the request is rejected. The presence of next_page_token in the response indicates that more results might be available. + * `pageSize` (*type:* `integer()`, *default:* `nil`) - Optional. The maximum number of results to return from this request. Default is 50. If the value is negative, the request is rejected.The presence of next_page_token in the response indicates that more results might be available. * `pageToken` (*type:* `String.t`, *default:* `nil`) - Optional. If present, then retrieve the next batch of results from the preceding call to this method. page_token must be the value of next_page_token from the previous response. The values of other method parameters should be identical to those in the previous call. * `projectIds` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Deprecated. Use resource_names instead. One or more project identifiers or project numbers from which to retrieve log entries. Example: "my-project-1A". - * `resourceNames` (*type:* `list(String.t)`, *default:* `nil`) - Required. Names of one or more parent resources from which to retrieve log entries: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]May alternatively be one or more views: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]Projects listed in the project_ids field are added to this list. + * `resourceNames` (*type:* `list(String.t)`, *default:* `nil`) - Required. Names of one or more parent resources from which to retrieve log entries: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]May alternatively be one or more views: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]Projects listed in the project_ids field are added to this list. A maximum of 100 resources may be specified in a single request. """ use GoogleApi.Gax.ModelBase diff --git a/clients/logging/lib/google_api/logging/v2/model/list_recent_queries_response.ex b/clients/logging/lib/google_api/logging/v2/model/list_recent_queries_response.ex new file mode 100644 index 0000000000..05afce4e57 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/list_recent_queries_response.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.Logging.V2.Model.ListRecentQueriesResponse do + @moduledoc """ + The response from ListRecentQueries. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken. + * `recentQueries` (*type:* `list(GoogleApi.Logging.V2.Model.RecentQuery.t)`, *default:* `nil`) - A list of recent queries. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - The unreachable resources. Each resource can be either 1) a saved query if a specific query is unreachable or 2) a location if a specific location is unreachable. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/recentQueries/[QUERY_ID]" "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example:"projects/my-project/locations/global/recentQueries/12345678" "projects/my-project/locations/global"If there are unreachable resources, the response will first return pages that contain recent queries, and then return pages that contain the unreachable resources. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :recentQueries => list(GoogleApi.Logging.V2.Model.RecentQuery.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + field(:recentQueries, as: GoogleApi.Logging.V2.Model.RecentQuery, type: :list) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.ListRecentQueriesResponse do + def decode(value, options) do + GoogleApi.Logging.V2.Model.ListRecentQueriesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.ListRecentQueriesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/list_saved_queries_response.ex b/clients/logging/lib/google_api/logging/v2/model/list_saved_queries_response.ex new file mode 100644 index 0000000000..da4c2fd4b6 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/list_saved_queries_response.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.Logging.V2.Model.ListSavedQueriesResponse do + @moduledoc """ + The response from ListSavedQueries. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken. + * `savedQueries` (*type:* `list(GoogleApi.Logging.V2.Model.SavedQuery.t)`, *default:* `nil`) - A list of saved queries. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - The unreachable resources. It can be either 1) a saved query if a specific query is unreachable or 2) a location if a specific location is unreachabe. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For example: "projects/my-project/locations/global/savedQueries/12345678" "projects/my-project/locations/global" If there are unreachable resources, the response will first return pages that contain saved queries, and then return pages that contain the unreachable resources. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :savedQueries => list(GoogleApi.Logging.V2.Model.SavedQuery.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + field(:savedQueries, as: GoogleApi.Logging.V2.Model.SavedQuery, type: :list) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.ListSavedQueriesResponse do + def decode(value, options) do + GoogleApi.Logging.V2.Model.ListSavedQueriesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.ListSavedQueriesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/location.ex b/clients/logging/lib/google_api/logging/v2/model/location.ex index f268770f8c..aaec0daeb6 100644 --- a/clients/logging/lib/google_api/logging/v2/model/location.ex +++ b/clients/logging/lib/google_api/logging/v2/model/location.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.Logging.V2.Model.Location do @moduledoc """ - A resource that represents Google Cloud Platform location. + A resource that represents a Google Cloud location. ## Attributes diff --git a/clients/logging/lib/google_api/logging/v2/model/location_metadata.ex b/clients/logging/lib/google_api/logging/v2/model/location_metadata.ex new file mode 100644 index 0000000000..b46f3a38c9 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/location_metadata.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.Logging.V2.Model.LocationMetadata do + @moduledoc """ + Cloud Logging specific location metadata. + + ## Attributes + + * `logAnalyticsEnabled` (*type:* `boolean()`, *default:* `nil`) - Indicates whether or not Log Analytics features are supported in the given location. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :logAnalyticsEnabled => boolean() | nil + } + + field(:logAnalyticsEnabled) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.LocationMetadata do + def decode(value, options) do + GoogleApi.Logging.V2.Model.LocationMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.LocationMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/log_bucket.ex b/clients/logging/lib/google_api/logging/v2/model/log_bucket.ex index 22ab370330..266ae5e665 100644 --- a/clients/logging/lib/google_api/logging/v2/model/log_bucket.ex +++ b/clients/logging/lib/google_api/logging/v2/model/log_bucket.ex @@ -21,21 +21,23 @@ defmodule GoogleApi.Logging.V2.Model.LogBucket do ## Attributes - * `cmekSettings` (*type:* `GoogleApi.Logging.V2.Model.CmekSettings.t`, *default:* `nil`) - The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. + * `analyticsEnabled` (*type:* `boolean()`, *default:* `nil`) - Whether log analytics is enabled for this bucket.Once enabled, log analytics features cannot be disabled. + * `cmekSettings` (*type:* `GoogleApi.Logging.V2.Model.CmekSettings.t`, *default:* `nil`) - Optional. The CMEK settings of the log bucket. If present, new log entries written to this log bucket are encrypted using the CMEK key provided in this configuration. If a log bucket has CMEK settings, the CMEK settings cannot be disabled later by updating the log bucket. Changing the KMS key is allowed. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The creation timestamp of the bucket. This is not set for any of the default buckets. - * `description` (*type:* `String.t`, *default:* `nil`) - Describes this bucket. - * `indexConfigs` (*type:* `list(GoogleApi.Logging.V2.Model.IndexConfig.t)`, *default:* `nil`) - A list of indexed fields and related configuration data. + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. Describes this bucket. + * `indexConfigs` (*type:* `list(GoogleApi.Logging.V2.Model.IndexConfig.t)`, *default:* `nil`) - Optional. A list of indexed fields and related configuration data. * `lifecycleState` (*type:* `String.t`, *default:* `nil`) - Output only. The bucket lifecycle state. - * `locked` (*type:* `boolean()`, *default:* `nil`) - Whether the bucket is locked.The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty. + * `locked` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the bucket is locked.The retention period on a locked bucket cannot be changed. Locked buckets may only be deleted if they are empty. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the bucket.For example:projects/my-project/locations/global/buckets/my-bucketFor a list of supported locations, see Supported Regions (https://cloud.google.com/logging/docs/region-support)For the location of global it is unspecified where log entries are actually stored.After a bucket has been created, the location cannot be changed. - * `restrictedFields` (*type:* `list(String.t)`, *default:* `nil`) - Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz) - * `retentionDays` (*type:* `integer()`, *default:* `nil`) - Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. + * `restrictedFields` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Log entry field paths that are denied access in this bucket.The following fields and their children are eligible: textPayload, jsonPayload, protoPayload, httpRequest, labels, sourceLocation.Restricting a repeated field will restrict all values. Adding a parent will block all child fields. (e.g. foo.bar will block foo.bar.baz) + * `retentionDays` (*type:* `integer()`, *default:* `nil`) - Optional. Logs will be retained by default for this amount of time, after which they will automatically be deleted. The minimum retention period is 1 day. If this value is set to zero at bucket creation time, the default time of 30 days will be used. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last update timestamp of the bucket. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :analyticsEnabled => boolean() | nil, :cmekSettings => GoogleApi.Logging.V2.Model.CmekSettings.t() | nil, :createTime => DateTime.t() | nil, :description => String.t() | nil, @@ -48,6 +50,7 @@ defmodule GoogleApi.Logging.V2.Model.LogBucket do :updateTime => DateTime.t() | nil } + field(:analyticsEnabled) field(:cmekSettings, as: GoogleApi.Logging.V2.Model.CmekSettings) field(:createTime, as: DateTime) field(:description) diff --git a/clients/logging/lib/google_api/logging/v2/model/log_entry.ex b/clients/logging/lib/google_api/logging/v2/model/log_entry.ex index 8e5c07f6a0..255f79ea70 100644 --- a/clients/logging/lib/google_api/logging/v2/model/log_entry.ex +++ b/clients/logging/lib/google_api/logging/v2/model/log_entry.ex @@ -21,11 +21,12 @@ defmodule GoogleApi.Logging.V2.Model.LogEntry do ## Attributes + * `errorGroups` (*type:* `list(GoogleApi.Logging.V2.Model.LogErrorGroup.t)`, *default:* `nil`) - Output only. The Error Reporting (https://cloud.google.com/error-reporting) error groups associated with this LogEntry. Error Reporting sets the values for this field during error group creation.For more information, see View error details( https://cloud.google.com/error-reporting/docs/viewing-errors#view_error_details)This field isn't available during log routing (https://cloud.google.com/logging/docs/routing/overview) * `httpRequest` (*type:* `GoogleApi.Logging.V2.Model.HttpRequest.t`, *default:* `nil`) - Optional. Information about the HTTP request associated with this log entry, if applicable. * `insertId` (*type:* `String.t`, *default:* `nil`) - Optional. A unique identifier for the log entry. If you provide a value, then Logging considers other log entries in the same project, with the same timestamp, and with the same insert_id to be duplicates which are removed in a single query result. However, there are no guarantees of de-duplication in the export of logs.If the insert_id is omitted when writing a log entry, the Logging API assigns its own unique identifier in this field.In queries, the insert_id is also used to order log entries that have the same log_name and timestamp values. * `jsonPayload` (*type:* `map()`, *default:* `nil`) - The log entry payload, represented as a structure that is expressed as a JSON object. * `labels` (*type:* `map()`, *default:* `nil`) - Optional. A map of key, value pairs that provides additional information about the log entry. The labels can be user-defined or system-defined.User-defined labels are arbitrary key, value pairs that you can use to classify logs.System-defined labels are defined by GCP services for platform logs. They have two components - a service namespace component and the attribute name. For example: compute.googleapis.com/resource_name.Cloud Logging truncates label keys that exceed 512 B and label values that exceed 64 KB upon their associated log entry being written. The truncation is indicated by an ellipsis at the end of the character string. - * `logName` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the log to which this log entry belongs: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity".[LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is ingested as usual, but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results. + * `logName` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the log to which this log entry belongs: "projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" A project number may be used in place of PROJECT_ID. The project number is translated to its corresponding PROJECT_ID internally and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be URL-encoded within log_name. Example: "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity".[LOG_ID] must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.For backward compatibility, if log_name begins with a forward-slash, such as /projects/..., then the log entry is processed as usual, but the forward-slash is removed. Listing the log entry will not show the leading slash and filtering for a log name with a leading slash will never return any results. * `metadata` (*type:* `GoogleApi.Logging.V2.Model.MonitoredResourceMetadata.t`, *default:* `nil`) - Output only. Deprecated. This field is not used by Logging. Any value written to it is cleared. * `operation` (*type:* `GoogleApi.Logging.V2.Model.LogEntryOperation.t`, *default:* `nil`) - Optional. Information about an operation associated with the log entry, if applicable. * `protoPayload` (*type:* `map()`, *default:* `nil`) - The log entry payload, represented as a protocol buffer. Some Google Cloud Platform services use this field for their log entry payloads.The following protocol buffer types are supported; user-defined types are not supported:"type.googleapis.com/google.cloud.audit.AuditLog" "type.googleapis.com/google.appengine.logging.v1.RequestLog" @@ -36,14 +37,15 @@ defmodule GoogleApi.Logging.V2.Model.LogEntry do * `spanId` (*type:* `String.t`, *default:* `nil`) - Optional. The ID of the Cloud Trace (https://cloud.google.com/trace) span associated with the current operation in which the log is being written. For example, if a span has the REST resource name of "projects/some-project/traces/some-trace/spans/some-span-id", then the span_id field is "some-span-id".A Span (https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) represents a single operation within a trace. Whereas a trace may involve multiple different microservices running on multiple different machines, a span generally corresponds to a single logical operation being performed in a single instance of a microservice on one specific machine. Spans are the nodes within the tree that is a trace.Applications that are instrumented for tracing (https://cloud.google.com/trace/docs/setup) will generally assign a new, unique span ID on each incoming request. It is also common to create and record additional spans corresponding to internal processing elements as well as issuing requests to dependencies.The span ID is expected to be a 16-character, hexadecimal encoding of an 8-byte array and should not be zero. It should be unique within the trace and should, ideally, be generated in a manner that is uniformly random.Example values: 000000000000004a 7a2190356c3fc94b 0000f00300090021 d39223e101960076 * `split` (*type:* `GoogleApi.Logging.V2.Model.LogSplit.t`, *default:* `nil`) - Optional. Information indicating this LogEntry is part of a sequence of multiple log entries split from a single LogEntry. * `textPayload` (*type:* `String.t`, *default:* `nil`) - The log entry payload, represented as a Unicode string (UTF-8). - * `timestamp` (*type:* `DateTime.t`, *default:* `nil`) - Optional. The time the event described by the log entry occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is displayed.Incoming log entries must have timestamps that don't exceed the logs retention period (https://cloud.google.com/logging/quotas#logs_retention_periods) in the past, and that don't exceed 24 hours in the future. Log entries outside those time boundaries aren't ingested by Logging. - * `trace` (*type:* `String.t`, *default:* `nil`) - Optional. The REST resource name of the trace being written to Cloud Trace (https://cloud.google.com/trace) in association with this log entry. For example, if your trace data is stored in the Cloud project "my-trace-project" and if the service that is creating the log entry receives a trace header that includes the trace ID "12345", then the service should use "projects/my-tracing-project/traces/12345".The trace field provides the link between logs and traces. By using this field, you can navigate from a log entry to a trace. - * `traceSampled` (*type:* `boolean()`, *default:* `nil`) - Optional. The sampling decision of the trace associated with the log entry.True means that the trace resource name in the trace field was sampled for storage in a trace backend. False means that the trace was not sampled for storage when this log entry was written, or the sampling decision was unknown at the time. A non-sampled trace value is still useful as a request correlation identifier. The default is False. + * `timestamp` (*type:* `DateTime.t`, *default:* `nil`) - Optional. The time the event described by the log entry occurred. This time is used to compute the log entry's age and to enforce the logs retention period. If this field is omitted in a new log entry, then Logging assigns it the current time. Timestamps have nanosecond accuracy, but trailing zeros in the fractional seconds might be omitted when the timestamp is displayed.Incoming log entries must have timestamps that don't exceed the logs retention period (https://cloud.google.com/logging/quotas#logs_retention_periods) in the past, and that don't exceed 24 hours in the future. Log entries outside those time boundaries are rejected by Logging. + * `trace` (*type:* `String.t`, *default:* `nil`) - Optional. The REST resource name of the trace being written to Cloud Trace (https://cloud.google.com/trace) in association with this log entry. For example, if your trace data is stored in the Cloud project "my-trace-project" and if the service that is creating the log entry receives a trace header that includes the trace ID "12345", then the service should use "projects/my-trace-project/traces/12345".The trace field provides the link between logs and traces. By using this field, you can navigate from a log entry to a trace. + * `traceSampled` (*type:* `boolean()`, *default:* `nil`) - Optional. The sampling decision of the span associated with the log entry at the time the log entry was created. This field corresponds to the sampled flag in the W3C trace-context specification (https://www.w3.org/TR/trace-context/#sampled-flag). A non-sampled trace value is still useful as a request correlation identifier. The default is False. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :errorGroups => list(GoogleApi.Logging.V2.Model.LogErrorGroup.t()) | nil, :httpRequest => GoogleApi.Logging.V2.Model.HttpRequest.t() | nil, :insertId => String.t() | nil, :jsonPayload => map() | nil, @@ -64,6 +66,7 @@ defmodule GoogleApi.Logging.V2.Model.LogEntry do :traceSampled => boolean() | nil } + field(:errorGroups, as: GoogleApi.Logging.V2.Model.LogErrorGroup, type: :list) field(:httpRequest, as: GoogleApi.Logging.V2.Model.HttpRequest) field(:insertId) field(:jsonPayload, type: :map) diff --git a/clients/logging/lib/google_api/logging/v2/model/log_error_group.ex b/clients/logging/lib/google_api/logging/v2/model/log_error_group.ex new file mode 100644 index 0000000000..ff284f3a3d --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/log_error_group.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.Logging.V2.Model.LogErrorGroup do + @moduledoc """ + Contains metadata that associates the LogEntry to Error Reporting error groups. + + ## Attributes + + * `id` (*type:* `String.t`, *default:* `nil`) - The id is a unique identifier for a particular error group; it is the last part of the error group resource name: /project/[PROJECT_ID]/errors/[ERROR_GROUP_ID]. Example: COShysOX0r_51QE. The id is derived from key parts of the error-log content and is treated as Service Data. For information about how Service Data is handled, see Google Cloud Privacy Notice (https://cloud.google.com/terms/cloud-privacy-notice). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :id => String.t() | nil + } + + field(:id) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.LogErrorGroup do + def decode(value, options) do + GoogleApi.Logging.V2.Model.LogErrorGroup.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.LogErrorGroup do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/log_exclusion.ex b/clients/logging/lib/google_api/logging/v2/model/log_exclusion.ex index ef5b5051ad..ab44b3b688 100644 --- a/clients/logging/lib/google_api/logging/v2/model/log_exclusion.ex +++ b/clients/logging/lib/google_api/logging/v2/model/log_exclusion.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.Logging.V2.Model.LogExclusion do * `description` (*type:* `String.t`, *default:* `nil`) - Optional. A description of this exclusion. * `disabled` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field. * `filter` (*type:* `String.t`, *default:* `nil`) - Required. An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-queries) that matches the log entries to be excluded. By using the sample function (https://cloud.google.com/logging/docs/view/advanced-queries#sample), you can exclude less than 100% of the matching log entries.For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets:resource.type=gcs_bucket severity=ERROR * `includeChildren` (*type:* `boolean()`, *default:* `nil`) - Optional. This field applies only to sinks owned by organizations and folders. If the field is false, the default, only the logs owned by the sink's parent resource are available for export. If the field is true, then log entries from all the projects, folders, and billing accounts contained in the sink's parent resource are also available for export. Whether a particular log entry from the children is exported depends on the sink's filter expression.For example, if this field is true, then the filter resource.type=gce_instance would export all Compute Engine VM instance log entries from all projects in the sink's parent.To only export entries from certain child projects, filter on the project part of the log name:logName:("projects/test-project1/" OR "projects/test-project2/") AND resource.type=gce_instance - * `name` (*type:* `String.t`, *default:* `nil`) - Required. The client-assigned sink identifier, unique within the project.For example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods. First character has to be alphanumeric. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The client-assigned sink identifier, unique within the project.For example: "my-syslog-errors-to-pubsub".Sink identifiers are limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric. * `outputVersionFormat` (*type:* `String.t`, *default:* `nil`) - Deprecated. This field is unused. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last update timestamp of the sink.This field may not be present for older sinks. * `writerIdentity` (*type:* `String.t`, *default:* `nil`) - Output only. An IAM identity—a service account or group—under which Cloud Logging writes the exported log entries to the sink's destination. This field is either set by specifying custom_writer_identity or set automatically by sinks.create and sinks.update based on the value of unique_writer_identity in those methods.Until you grant this identity write-access to the destination, log entry exports from this sink will fail. For more information, see Granting Access for a Resource (https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). Consult the destination service's documentation to determine the appropriate IAM roles to assign to the identity.Sinks that have a destination that is a log bucket in the same project as the sink cannot have a writer_identity and no additional permissions are required. diff --git a/clients/logging/lib/google_api/logging/v2/model/log_view.ex b/clients/logging/lib/google_api/logging/v2/model/log_view.ex index ff58b84b51..f4247b87cb 100644 --- a/clients/logging/lib/google_api/logging/v2/model/log_view.ex +++ b/clients/logging/lib/google_api/logging/v2/model/log_view.ex @@ -22,9 +22,9 @@ defmodule GoogleApi.Logging.V2.Model.LogView do ## Attributes * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The creation timestamp of the view. - * `description` (*type:* `String.t`, *default:* `nil`) - Describes this view. - * `filter` (*type:* `String.t`, *default:* `nil`) - Filter that restricts which log entries in a bucket are visible in this view.Filters are restricted to be a logical AND of ==/!= of any of the following: originating project/folder/organization/billing account. resource type log idFor example:SOURCE("projects/myproject") AND resource.type = "gce_instance" AND LOG_ID("stdout") - * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the view.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. Describes this view. + * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. Filter that restricts which log entries in a bucket are visible in this view.Filters must be logical conjunctions that use the AND operator, and they can use any of the following qualifiers: SOURCE(), which specifies a project, folder, organization, or billing account of origin. resource.type, which specifies the resource type. LOG_ID(), which identifies the log.They can also use the negations of these qualifiers with the NOT operator.For example:SOURCE("projects/myproject") AND resource.type = "gce_instance" AND NOT LOG_ID("stdout") + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the view.For example:projects/my-project/locations/global/buckets/my-bucket/views/my-view * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last update timestamp of the view. """ diff --git a/clients/logging/lib/google_api/logging/v2/model/logging_query.ex b/clients/logging/lib/google_api/logging/v2/model/logging_query.ex new file mode 100644 index 0000000000..c7f9f9b653 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/logging_query.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.Logging.V2.Model.LoggingQuery do + @moduledoc """ + Describes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results. + + ## Attributes + + * `filter` (*type:* `String.t`, *default:* `nil`) - Required. An advanced query using the Logging Query Language (https://cloud.google.com/logging/docs/view/logging-query-language). The maximum length of the filter is 20000 characters. + * `summaryFieldEnd` (*type:* `integer()`, *default:* `nil`) - Characters will be counted from the end of the string. + * `summaryFieldStart` (*type:* `integer()`, *default:* `nil`) - Characters will be counted from the start of the string. + * `summaryFields` (*type:* `list(GoogleApi.Logging.V2.Model.SummaryField.t)`, *default:* `nil`) - Optional. The set of summary fields to display for this saved query. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :filter => String.t() | nil, + :summaryFieldEnd => integer() | nil, + :summaryFieldStart => integer() | nil, + :summaryFields => list(GoogleApi.Logging.V2.Model.SummaryField.t()) | nil + } + + field(:filter) + field(:summaryFieldEnd) + field(:summaryFieldStart) + field(:summaryFields, as: GoogleApi.Logging.V2.Model.SummaryField, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.LoggingQuery do + def decode(value, options) do + GoogleApi.Logging.V2.Model.LoggingQuery.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.LoggingQuery do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/monitored_resource_descriptor.ex b/clients/logging/lib/google_api/logging/v2/model/monitored_resource_descriptor.ex index 1cded86723..0d4e263120 100644 --- a/clients/logging/lib/google_api/logging/v2/model/monitored_resource_descriptor.ex +++ b/clients/logging/lib/google_api/logging/v2/model/monitored_resource_descriptor.ex @@ -26,7 +26,7 @@ defmodule GoogleApi.Logging.V2.Model.MonitoredResourceDescriptor do * `labels` (*type:* `list(GoogleApi.Logging.V2.Model.LabelDescriptor.t)`, *default:* `nil`) - Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels "database_id" and "zone". * `launchStage` (*type:* `String.t`, *default:* `nil`) - Optional. The launch stage of the monitored resource definition. * `name` (*type:* `String.t`, *default:* `nil`) - Optional. The resource name of the monitored resource descriptor: "projects/{project_id}/monitoredResourceDescriptors/{type}" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format "monitoredResourceDescriptors/{type}". - * `type` (*type:* `String.t`, *default:* `nil`) - Required. The monitored resource type. For example, the type "cloudsql_database" represents databases in Google Cloud SQL. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list). + * `type` (*type:* `String.t`, *default:* `nil`) - Required. The monitored resource type. For example, the type "cloudsql_database" represents databases in Google Cloud SQL. For a list of types, see Monitored resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list). """ use GoogleApi.Gax.ModelBase diff --git a/clients/logging/lib/google_api/logging/v2/model/operation.ex b/clients/logging/lib/google_api/logging/v2/model/operation.ex index f2fc57c93e..c9357642d5 100644 --- a/clients/logging/lib/google_api/logging/v2/model/operation.ex +++ b/clients/logging/lib/google_api/logging/v2/model/operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.Logging.V2.Model.Operation do * `error` (*type:* `GoogleApi.Logging.V2.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/logging/lib/google_api/logging/v2/model/ops_analytics_query.ex b/clients/logging/lib/google_api/logging/v2/model/ops_analytics_query.ex new file mode 100644 index 0000000000..9e4ac02b9e --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/ops_analytics_query.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.Logging.V2.Model.OpsAnalyticsQuery do + @moduledoc """ + Describes an analytics query that can be run in the Log Analytics page of Google Cloud console.Preview: This is a preview feature and may be subject to change before final release. + + ## Attributes + + * `sqlQueryText` (*type:* `String.t`, *default:* `nil`) - Required. A logs analytics SQL query, which generally follows BigQuery format.This is the SQL query that appears in the Log Analytics UI's query editor. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :sqlQueryText => String.t() | nil + } + + field(:sqlQueryText) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.OpsAnalyticsQuery do + def decode(value, options) do + GoogleApi.Logging.V2.Model.OpsAnalyticsQuery.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.OpsAnalyticsQuery do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/recent_query.ex b/clients/logging/lib/google_api/logging/v2/model/recent_query.ex new file mode 100644 index 0000000000..83cf2d467b --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/recent_query.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.Logging.V2.Model.RecentQuery do + @moduledoc """ + Describes a recent query executed on the Logs Explorer or Log Analytics page within the last ~ 30 days. + + ## Attributes + + * `lastRunTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp when this query was last run. + * `loggingQuery` (*type:* `GoogleApi.Logging.V2.Model.LoggingQuery.t`, *default:* `nil`) - Logging query that can be executed in Logs Explorer or via Logging API. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. Resource name of the recent query.In the format: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/recentQueries/[QUERY_ID]" For a list of supported locations, see Supported Regions (https://cloud.google.com/logging/docs/region-support)The QUERY_ID is a system generated alphanumeric ID. + * `opsAnalyticsQuery` (*type:* `GoogleApi.Logging.V2.Model.OpsAnalyticsQuery.t`, *default:* `nil`) - Analytics query that can be executed in Log Analytics. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :lastRunTime => DateTime.t() | nil, + :loggingQuery => GoogleApi.Logging.V2.Model.LoggingQuery.t() | nil, + :name => String.t() | nil, + :opsAnalyticsQuery => GoogleApi.Logging.V2.Model.OpsAnalyticsQuery.t() | nil + } + + field(:lastRunTime, as: DateTime) + field(:loggingQuery, as: GoogleApi.Logging.V2.Model.LoggingQuery) + field(:name) + field(:opsAnalyticsQuery, as: GoogleApi.Logging.V2.Model.OpsAnalyticsQuery) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.RecentQuery do + def decode(value, options) do + GoogleApi.Logging.V2.Model.RecentQuery.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.RecentQuery do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/saved_query.ex b/clients/logging/lib/google_api/logging/v2/model/saved_query.ex new file mode 100644 index 0000000000..52765a09cc --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/saved_query.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.Logging.V2.Model.SavedQuery do + @moduledoc """ + Describes a query that has been saved by a user. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp when the saved query was created. + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. A human readable description of the saved query. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The user specified title for the SavedQuery. + * `loggingQuery` (*type:* `GoogleApi.Logging.V2.Model.LoggingQuery.t`, *default:* `nil`) - Logging query that can be executed in Logs Explorer or via Logging API. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. Resource name of the saved query.In the format: "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For a list of supported locations, see Supported Regions (https://cloud.google.com/logging/docs/region-support#bucket-regions)After the saved query is created, the location cannot be changed.If the user doesn't provide a QUERY_ID, the system will generate an alphanumeric ID. + * `opsAnalyticsQuery` (*type:* `GoogleApi.Logging.V2.Model.OpsAnalyticsQuery.t`, *default:* `nil`) - Analytics query that can be executed in Log Analytics. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp when the saved query was last updated. + * `visibility` (*type:* `String.t`, *default:* `nil`) - Required. The visibility status of this query, which determines its ownership. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :displayName => String.t() | nil, + :loggingQuery => GoogleApi.Logging.V2.Model.LoggingQuery.t() | nil, + :name => String.t() | nil, + :opsAnalyticsQuery => GoogleApi.Logging.V2.Model.OpsAnalyticsQuery.t() | nil, + :updateTime => DateTime.t() | nil, + :visibility => String.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:displayName) + field(:loggingQuery, as: GoogleApi.Logging.V2.Model.LoggingQuery) + field(:name) + field(:opsAnalyticsQuery, as: GoogleApi.Logging.V2.Model.OpsAnalyticsQuery) + field(:updateTime, as: DateTime) + field(:visibility) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.SavedQuery do + def decode(value, options) do + GoogleApi.Logging.V2.Model.SavedQuery.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.SavedQuery do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/settings.ex b/clients/logging/lib/google_api/logging/v2/model/settings.ex index 621171025f..e7f9fdf7ab 100644 --- a/clients/logging/lib/google_api/logging/v2/model/settings.ex +++ b/clients/logging/lib/google_api/logging/v2/model/settings.ex @@ -17,30 +17,36 @@ defmodule GoogleApi.Logging.V2.Model.Settings do @moduledoc """ - Describes the settings associated with a project, folder, organization, billing account, or flexible resource. + Describes the settings associated with a project, folder, organization, or billing account. ## Attributes - * `disableDefaultSink` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, the _Default sink in newly created projects and folders will created in a disabled state. This can be used to automatically disable log ingestion if there is already an aggregated sink configured in the hierarchy. The _Default sink can be re-enabled manually if needed. - * `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - Optional. The resource name for the configured Cloud KMS key.KMS key name format: "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" For example:"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"To enable CMEK for the Log Router, set this field to a valid kms_key_name for which the associated service account has the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key.The Cloud KMS key used by the Log Router can be updated by changing the kms_key_name to a new valid key name. Encryption operations that are in progress will be completed with the key that was in use when they started. Decryption operations will be completed using the key that was used at the time of encryption unless access to that key has been revoked.To disable CMEK for the Log Router, set this field to an empty string.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. - * `kmsServiceAccountId` (*type:* `String.t`, *default:* `nil`) - Output only. The service account that will be used by the Log Router to access your Cloud KMS key.Before enabling CMEK for Log Router, you must first assign the role roles/cloudkms.cryptoKeyEncrypterDecrypter to the service account that the Log Router will use to access your Cloud KMS key. Use GetSettings to obtain the service account ID.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * `defaultSinkConfig` (*type:* `GoogleApi.Logging.V2.Model.DefaultSinkConfig.t`, *default:* `nil`) - Optional. Overrides the built-in configuration for _Default sink. + * `disableDefaultSink` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, the _Default sink in newly created projects and folders will created in a disabled state. This can be used to automatically disable log storage if there is already an aggregated sink configured in the hierarchy. The _Default sink can be re-enabled manually if needed. + * `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - Optional. The resource name for the configured Cloud KMS key.KMS key name format: "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" For example:"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"To enable CMEK, set this field to a valid kms_key_name for which the associated service account has the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key.The Cloud KMS key used by the Log Router can be updated by changing the kms_key_name to a new valid key name.To disable CMEK for the Log Router, set this field to an empty string.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * `kmsServiceAccountId` (*type:* `String.t`, *default:* `nil`) - Output only. The service account that will be used by the Log Router to access your Cloud KMS key.Before enabling CMEK, you must first assign the role roles/cloudkms.cryptoKeyEncrypterDecrypter to the service account that will be used to access your Cloud KMS key. Use GetSettings to obtain the service account ID.See Enabling CMEK for Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. + * `loggingServiceAccountId` (*type:* `String.t`, *default:* `nil`) - Output only. The service account for the given resource container, such as project or folder. Log sinks use this service account as their writer_identity if no custom service account is provided in the request when calling the create sink method. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the settings. - * `storageLocation` (*type:* `String.t`, *default:* `nil`) - Optional. The Cloud region that will be used for _Default and _Required log buckets for newly created projects and folders. For example europe-west1. This setting does not affect the location of custom log buckets. + * `storageLocation` (*type:* `String.t`, *default:* `nil`) - Optional. The storage location for the _Default and _Required log buckets of newly created projects and folders, unless the storage location is explicitly provided.Example value: europe-west1.Note: this setting does not affect the location of resources where a location is explicitly provided when created, such as custom log buckets. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :defaultSinkConfig => GoogleApi.Logging.V2.Model.DefaultSinkConfig.t() | nil, :disableDefaultSink => boolean() | nil, :kmsKeyName => String.t() | nil, :kmsServiceAccountId => String.t() | nil, + :loggingServiceAccountId => String.t() | nil, :name => String.t() | nil, :storageLocation => String.t() | nil } + field(:defaultSinkConfig, as: GoogleApi.Logging.V2.Model.DefaultSinkConfig) field(:disableDefaultSink) field(:kmsKeyName) field(:kmsServiceAccountId) + field(:loggingServiceAccountId) field(:name) field(:storageLocation) end diff --git a/clients/logging/lib/google_api/logging/v2/model/summary_field.ex b/clients/logging/lib/google_api/logging/v2/model/summary_field.ex new file mode 100644 index 0000000000..655e3fb5b5 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/summary_field.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.Logging.V2.Model.SummaryField do + @moduledoc """ + A field from the LogEntry that is added to the summary line (https://cloud.google.com/logging/docs/view/logs-explorer-interface#add-summary-fields) for a query in the Logs Explorer. + + ## Attributes + + * `field` (*type:* `String.t`, *default:* `nil`) - Optional. The field from the LogEntry to include in the summary line, for example resource.type or jsonPayload.name. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :field => String.t() | nil + } + + field(:field) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.SummaryField do + def decode(value, options) do + GoogleApi.Logging.V2.Model.SummaryField.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.SummaryField do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/logging/lib/google_api/logging/v2/model/tail_log_entries_request.ex b/clients/logging/lib/google_api/logging/v2/model/tail_log_entries_request.ex index d9cc350505..c5770a8f7b 100644 --- a/clients/logging/lib/google_api/logging/v2/model/tail_log_entries_request.ex +++ b/clients/logging/lib/google_api/logging/v2/model/tail_log_entries_request.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.Logging.V2.Model.TailLogEntriesRequest do ## Attributes * `bufferWindow` (*type:* `String.t`, *default:* `nil`) - Optional. The amount of time to buffer log entries at the server before being returned to prevent out of order results due to late arriving log entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 milliseconds. - * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. A filter that chooses which log entries to return. See Advanced Logs Filters (https://cloud.google.com/logging/docs/view/advanced_filters). Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not in resource_names will cause the filter to return no results. The maximum length of the filter is 20000 characters. + * `filter` (*type:* `String.t`, *default:* `nil`) - Optional. Only log entries that match the filter are returned. An empty filter matches all log entries in the resources listed in resource_names. Referencing a parent resource that is not listed in resource_names will cause the filter to return no results. The maximum length of a filter is 20,000 characters. * `resourceNames` (*type:* `list(String.t)`, *default:* `nil`) - Required. Name of a parent resource from which to retrieve log entries: projects/[PROJECT_ID] organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] folders/[FOLDER_ID]May alternatively be one or more views: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID] """ diff --git a/clients/logging/lib/google_api/logging/v2/model/update_bucket_request.ex b/clients/logging/lib/google_api/logging/v2/model/update_bucket_request.ex new file mode 100644 index 0000000000..600e8e4fe2 --- /dev/null +++ b/clients/logging/lib/google_api/logging/v2/model/update_bucket_request.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.Logging.V2.Model.UpdateBucketRequest do + @moduledoc """ + The parameters to UpdateBucket. + + ## Attributes + + * `bucket` (*type:* `GoogleApi.Logging.V2.Model.LogBucket.t`, *default:* `nil`) - Required. The updated bucket. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The full resource name of the bucket to update. "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For example:"projects/my-project/locations/global/buckets/my-bucket" + * `updateMask` (*type:* `String.t`, *default:* `nil`) - Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=retention_days + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :bucket => GoogleApi.Logging.V2.Model.LogBucket.t() | nil, + :name => String.t() | nil, + :updateMask => String.t() | nil + } + + field(:bucket, as: GoogleApi.Logging.V2.Model.LogBucket) + field(:name) + field(:updateMask) +end + +defimpl Poison.Decoder, for: GoogleApi.Logging.V2.Model.UpdateBucketRequest do + def decode(value, options) do + GoogleApi.Logging.V2.Model.UpdateBucketRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Logging.V2.Model.UpdateBucketRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end