From 8b1c36a797110675cdd98066ffd9e1dea06a79ae Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 01:32:01 +0000 Subject: [PATCH] feat: Automated regeneration of Redis client --- .../lib/google_api/redis/v1/api/projects.ex | 483 ++++++++++++++++- .../redis/lib/google_api/redis/v1/metadata.ex | 2 +- .../v1/model/availability_configuration.ex | 52 ++ .../redis/v1/model/backup_configuration.ex | 52 ++ .../google_api/redis/v1/model/backup_run.ex | 55 ++ .../google_api/redis/v1/model/cert_chain.ex | 46 ++ .../redis/v1/model/certificate_authority.ex | 49 ++ .../lib/google_api/redis/v1/model/cluster.ex | 82 +++ .../google_api/redis/v1/model/compliance.ex | 49 ++ .../redis/v1/model/custom_metadata_data.ex | 46 ++ .../redis/v1/model/database_metadata.ex | 58 +++ .../redis/v1/model/database_resource_feed.ex | 67 +++ .../database_resource_health_signal_data.ex | 82 +++ .../redis/v1/model/database_resource_id.ex | 55 ++ .../v1/model/database_resource_metadata.ex | 95 ++++ ...ase_resource_recommendation_signal_data.ex | 67 +++ .../redis/v1/model/discovery_endpoint.ex | 52 ++ .../google_api/redis/v1/model/entitlement.ex | 49 ++ .../lib/google_api/redis/v1/model/instance.ex | 14 +- .../redis/v1/model/list_clusters_response.ex | 52 ++ .../lib/google_api/redis/v1/model/location.ex | 2 +- .../v1/model/managed_certificate_authority.ex | 46 ++ .../google_api/redis/v1/model/operation.ex | 2 +- .../redis/v1/model/operation_error.ex | 52 ++ .../redis/v1/model/operation_metadata.ex | 64 +++ .../lib/google_api/redis/v1/model/product.ex | 52 ++ .../google_api/redis/v1/model/psc_config.ex | 46 ++ .../redis/v1/model/psc_connection.ex | 58 +++ .../redis/v1/model/retention_settings.ex | 52 ++ .../google_api/redis/v1/model/state_info.ex | 46 ++ .../google_api/redis/v1/model/update_info.ex | 49 ++ .../google_api/redis/v1beta1/api/projects.ex | 492 +++++++++++++++++- .../lib/google_api/redis/v1beta1/metadata.ex | 2 +- .../model/availability_configuration.ex | 52 ++ .../v1beta1/model/backup_configuration.ex | 52 ++ .../redis/v1beta1/model/backup_run.ex | 55 ++ .../redis/v1beta1/model/cert_chain.ex | 46 ++ .../v1beta1/model/certificate_authority.ex | 49 ++ .../google_api/redis/v1beta1/model/cluster.ex | 82 +++ .../redis/v1beta1/model/compliance.ex | 49 ++ .../v1beta1/model/custom_metadata_data.ex | 46 ++ .../redis/v1beta1/model/database_metadata.ex | 58 +++ .../v1beta1/model/database_resource_feed.ex | 70 +++ .../database_resource_health_signal_data.ex | 82 +++ .../v1beta1/model/database_resource_id.ex | 55 ++ .../model/database_resource_metadata.ex | 95 ++++ ...ase_resource_recommendation_signal_data.ex | 69 +++ .../redis/v1beta1/model/discovery_endpoint.ex | 52 ++ .../redis/v1beta1/model/entitlement.ex | 49 ++ .../redis/v1beta1/model/instance.ex | 8 +- .../v1beta1/model/list_clusters_response.ex | 52 ++ .../redis/v1beta1/model/location.ex | 2 +- .../model/managed_certificate_authority.ex | 46 ++ .../redis/v1beta1/model/operation.ex | 2 +- .../redis/v1beta1/model/operation_error.ex | 52 ++ .../redis/v1beta1/model/operation_metadata.ex | 64 +++ .../google_api/redis/v1beta1/model/product.ex | 52 ++ .../redis/v1beta1/model/psc_config.ex | 46 ++ .../redis/v1beta1/model/psc_connection.ex | 58 +++ .../redis/v1beta1/model/retention_settings.ex | 52 ++ .../redis/v1beta1/model/state_info.ex | 46 ++ .../redis/v1beta1/model/update_info.ex | 49 ++ 62 files changed, 3950 insertions(+), 10 deletions(-) create mode 100644 clients/redis/lib/google_api/redis/v1/model/availability_configuration.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/backup_configuration.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/backup_run.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/cert_chain.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/certificate_authority.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/cluster.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/compliance.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/custom_metadata_data.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/database_metadata.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/database_resource_feed.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/database_resource_health_signal_data.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/database_resource_id.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/database_resource_metadata.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/database_resource_recommendation_signal_data.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/discovery_endpoint.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/entitlement.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/list_clusters_response.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/managed_certificate_authority.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/operation_error.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/operation_metadata.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/product.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/psc_config.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/psc_connection.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/retention_settings.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/state_info.ex create mode 100644 clients/redis/lib/google_api/redis/v1/model/update_info.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/availability_configuration.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/backup_configuration.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/backup_run.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/cert_chain.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/certificate_authority.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/cluster.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/compliance.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/custom_metadata_data.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/database_metadata.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/database_resource_feed.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/database_resource_health_signal_data.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/database_resource_id.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/database_resource_metadata.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/database_resource_recommendation_signal_data.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/discovery_endpoint.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/entitlement.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/list_clusters_response.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/managed_certificate_authority.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/operation_error.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/operation_metadata.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/product.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/psc_config.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/psc_connection.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/retention_settings.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/state_info.ex create mode 100644 clients/redis/lib/google_api/redis/v1beta1/model/update_info.ex diff --git a/clients/redis/lib/google_api/redis/v1/api/projects.ex b/clients/redis/lib/google_api/redis/v1/api/projects.ex index 9ba3b0b254..68a631e9b7 100644 --- a/clients/redis/lib/google_api/redis/v1/api/projects.ex +++ b/clients/redis/lib/google_api/redis/v1/api/projects.ex @@ -165,6 +165,487 @@ defmodule GoogleApi.Redis.V1.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.Redis.V1.Model.ListLocationsResponse{}]) end + @doc """ + Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * `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"). + * `:clusterId` (*type:* `String.t`) - Required. The logical name of the Redis cluster in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the customer project / location + * `:requestId` (*type:* `String.t`) - Idempotent request UUID. + * `:body` (*type:* `GoogleApi.Redis.V1.Model.Cluster.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Redis.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_create( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_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, + :clusterId => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/clusters", %{ + "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.Redis.V1.Model.Operation{}]) + end + + @doc """ + Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `clusters_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"). + * `:requestId` (*type:* `String.t`) - Idempotent request UUID. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Redis.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_delete( + connection, + projects_id, + locations_id, + clusters_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, + :requestId => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "clustersId" => URI.encode(clusters_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.Redis.V1.Model.Operation{}]) + end + + @doc """ + Gets the details of a specific Redis cluster. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `clusters_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.Redis.V1.Model.Cluster{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1.Model.Cluster.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_get( + connection, + projects_id, + locations_id, + clusters_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "clustersId" => URI.encode(clusters_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.Redis.V1.Model.Cluster{}]) + end + + @doc """ + Gets the details of certificate authority information for Redis cluster. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Redis cluster certificate authority resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` where `location_id` refers to a GCP region. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `clusters_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.Redis.V1.Model.CertificateAuthority{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_get_certificate_authority( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1.Model.CertificateAuthority.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_get_certificate_authority( + connection, + projects_id, + locations_id, + clusters_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/certificateAuthority", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "clustersId" => URI.encode(clusters_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.Redis.V1.Model.CertificateAuthority{}]) + end + + @doc """ + Lists all Redis clusters owned by a project in either the specified location (region) or all locations. The location should have the following format: * `projects/{project_id}/locations/{location_id}` If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * `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()`) - The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more clusters left to be queried. + * `:pageToken` (*type:* `String.t`) - The `next_page_token` value returned from a previous ListClusters request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Redis.V1.Model.ListClustersResponse{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1.Model.ListClustersResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_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("/v1/projects/{projectsId}/locations/{locationsId}/clusters", %{ + "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.Redis.V1.Model.ListClustersResponse{}]) + end + + @doc """ + Updates the metadata and configuration of a specific Redis cluster. Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `cluster.name`. Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * `locations_id` (*type:* `String.t`) - Part of `cluster.name`. See documentation of `projectsId`. + * `clusters_id` (*type:* `String.t`) - Part of `cluster.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"). + * `:requestId` (*type:* `String.t`) - Idempotent request UUID. + * `:updateMask` (*type:* `String.t`) - Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Cluster: * `size_gb` * `replica_count` + * `:body` (*type:* `GoogleApi.Redis.V1.Model.Cluster.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Redis.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_patch( + connection, + projects_id, + locations_id, + clusters_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, + :requestId => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "clustersId" => URI.encode(clusters_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.Redis.V1.Model.Operation{}]) + end + @doc """ Creates a Redis instance based on the specified tier and memory size. By default, the instance is accessible from the project's [default network](https://cloud.google.com/vpc/docs/vpc). The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. @@ -1308,7 +1789,7 @@ defmodule GoogleApi.Redis.V1.Api.Projects 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/redis/lib/google_api/redis/v1/metadata.ex b/clients/redis/lib/google_api/redis/v1/metadata.ex index ec53be1969..20caa4a9dc 100644 --- a/clients/redis/lib/google_api/redis/v1/metadata.ex +++ b/clients/redis/lib/google_api/redis/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Redis.V1 do API client metadata for GoogleApi.Redis.V1. """ - @discovery_revision "20221007" + @discovery_revision "20240229" def discovery_revision(), do: @discovery_revision end diff --git a/clients/redis/lib/google_api/redis/v1/model/availability_configuration.ex b/clients/redis/lib/google_api/redis/v1/model/availability_configuration.ex new file mode 100644 index 0000000000..05c99738c9 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/availability_configuration.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.Redis.V1.Model.AvailabilityConfiguration do + @moduledoc """ + Configuration for availability of database instance + + ## Attributes + + * `availabilityType` (*type:* `String.t`, *default:* `nil`) - Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available). + * `externalReplicaConfigured` (*type:* `boolean()`, *default:* `nil`) - + * `promotableReplicaConfigured` (*type:* `boolean()`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :availabilityType => String.t() | nil, + :externalReplicaConfigured => boolean() | nil, + :promotableReplicaConfigured => boolean() | nil + } + + field(:availabilityType) + field(:externalReplicaConfigured) + field(:promotableReplicaConfigured) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.AvailabilityConfiguration do + def decode(value, options) do + GoogleApi.Redis.V1.Model.AvailabilityConfiguration.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.AvailabilityConfiguration do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/backup_configuration.ex b/clients/redis/lib/google_api/redis/v1/model/backup_configuration.ex new file mode 100644 index 0000000000..668c0b53f0 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/backup_configuration.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.Redis.V1.Model.BackupConfiguration do + @moduledoc """ + Configuration for automatic backups + + ## Attributes + + * `automatedBackupEnabled` (*type:* `boolean()`, *default:* `nil`) - Whether customer visible automated backups are enabled on the instance. + * `backupRetentionSettings` (*type:* `GoogleApi.Redis.V1.Model.RetentionSettings.t`, *default:* `nil`) - Backup retention settings. + * `pointInTimeRecoveryEnabled` (*type:* `boolean()`, *default:* `nil`) - Whether point-in-time recovery is enabled. This is optional field, if the database service does not have this feature or metadata is not available in control plane, this can be omitted. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :automatedBackupEnabled => boolean() | nil, + :backupRetentionSettings => GoogleApi.Redis.V1.Model.RetentionSettings.t() | nil, + :pointInTimeRecoveryEnabled => boolean() | nil + } + + field(:automatedBackupEnabled) + field(:backupRetentionSettings, as: GoogleApi.Redis.V1.Model.RetentionSettings) + field(:pointInTimeRecoveryEnabled) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.BackupConfiguration do + def decode(value, options) do + GoogleApi.Redis.V1.Model.BackupConfiguration.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.BackupConfiguration do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/backup_run.ex b/clients/redis/lib/google_api/redis/v1/model/backup_run.ex new file mode 100644 index 0000000000..524ad60a4a --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/backup_run.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.Redis.V1.Model.BackupRun do + @moduledoc """ + A backup run. + + ## Attributes + + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - The time the backup operation completed. REQUIRED + * `error` (*type:* `GoogleApi.Redis.V1.Model.OperationError.t`, *default:* `nil`) - Information about why the backup operation failed. This is only present if the run has the FAILED status. OPTIONAL + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - The time the backup operation started. REQUIRED + * `status` (*type:* `String.t`, *default:* `nil`) - The status of this run. REQUIRED + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endTime => DateTime.t() | nil, + :error => GoogleApi.Redis.V1.Model.OperationError.t() | nil, + :startTime => DateTime.t() | nil, + :status => String.t() | nil + } + + field(:endTime, as: DateTime) + field(:error, as: GoogleApi.Redis.V1.Model.OperationError) + field(:startTime, as: DateTime) + field(:status) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.BackupRun do + def decode(value, options) do + GoogleApi.Redis.V1.Model.BackupRun.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.BackupRun do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/cert_chain.ex b/clients/redis/lib/google_api/redis/v1/model/cert_chain.ex new file mode 100644 index 0000000000..8b2eb16cf9 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/cert_chain.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.Redis.V1.Model.CertChain do + @moduledoc """ + + + ## Attributes + + * `certificates` (*type:* `list(String.t)`, *default:* `nil`) - The certificates that form the CA chain, from leaf to root order. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :certificates => list(String.t()) | nil + } + + field(:certificates, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.CertChain do + def decode(value, options) do + GoogleApi.Redis.V1.Model.CertChain.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.CertChain do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/certificate_authority.ex b/clients/redis/lib/google_api/redis/v1/model/certificate_authority.ex new file mode 100644 index 0000000000..426ce1cbb8 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/certificate_authority.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.Redis.V1.Model.CertificateAuthority do + @moduledoc """ + Redis cluster certificate authority + + ## Attributes + + * `managedServerCa` (*type:* `GoogleApi.Redis.V1.Model.ManagedCertificateAuthority.t`, *default:* `nil`) - + * `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Unique name of the resource in this scope including project, location and cluster using the form: `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :managedServerCa => GoogleApi.Redis.V1.Model.ManagedCertificateAuthority.t() | nil, + :name => String.t() | nil + } + + field(:managedServerCa, as: GoogleApi.Redis.V1.Model.ManagedCertificateAuthority) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.CertificateAuthority do + def decode(value, options) do + GoogleApi.Redis.V1.Model.CertificateAuthority.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.CertificateAuthority do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/cluster.ex b/clients/redis/lib/google_api/redis/v1/model/cluster.ex new file mode 100644 index 0000000000..a381e47843 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/cluster.ex @@ -0,0 +1,82 @@ +# 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.Redis.V1.Model.Cluster do + @moduledoc """ + A cluster instance. + + ## Attributes + + * `authorizationMode` (*type:* `String.t`, *default:* `nil`) - Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp associated with the cluster creation request. + * `discoveryEndpoints` (*type:* `list(GoogleApi.Redis.V1.Model.DiscoveryEndpoint.t)`, *default:* `nil`) - Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * `pscConfigs` (*type:* `list(GoogleApi.Redis.V1.Model.PscConfig.t)`, *default:* `nil`) - Required. Each PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation. Currently, only one PscConfig is supported. + * `pscConnections` (*type:* `list(GoogleApi.Redis.V1.Model.PscConnection.t)`, *default:* `nil`) - Output only. PSC connections for discovery of the cluster topology and accessing the cluster. + * `replicaCount` (*type:* `integer()`, *default:* `nil`) - Optional. The number of replica nodes per shard. + * `shardCount` (*type:* `integer()`, *default:* `nil`) - Required. Number of shards for the Redis cluster. + * `sizeGb` (*type:* `integer()`, *default:* `nil`) - Output only. Redis memory size in GB for the entire cluster rounded up to the next integer. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED + * `stateInfo` (*type:* `GoogleApi.Redis.V1.Model.StateInfo.t`, *default:* `nil`) - Output only. Additional information about the current state of the cluster. + * `transitEncryptionMode` (*type:* `String.t`, *default:* `nil`) - Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster. + * `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System assigned, unique identifier for the cluster. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :authorizationMode => String.t() | nil, + :createTime => DateTime.t() | nil, + :discoveryEndpoints => list(GoogleApi.Redis.V1.Model.DiscoveryEndpoint.t()) | nil, + :name => String.t() | nil, + :pscConfigs => list(GoogleApi.Redis.V1.Model.PscConfig.t()) | nil, + :pscConnections => list(GoogleApi.Redis.V1.Model.PscConnection.t()) | nil, + :replicaCount => integer() | nil, + :shardCount => integer() | nil, + :sizeGb => integer() | nil, + :state => String.t() | nil, + :stateInfo => GoogleApi.Redis.V1.Model.StateInfo.t() | nil, + :transitEncryptionMode => String.t() | nil, + :uid => String.t() | nil + } + + field(:authorizationMode) + field(:createTime, as: DateTime) + field(:discoveryEndpoints, as: GoogleApi.Redis.V1.Model.DiscoveryEndpoint, type: :list) + field(:name) + field(:pscConfigs, as: GoogleApi.Redis.V1.Model.PscConfig, type: :list) + field(:pscConnections, as: GoogleApi.Redis.V1.Model.PscConnection, type: :list) + field(:replicaCount) + field(:shardCount) + field(:sizeGb) + field(:state) + field(:stateInfo, as: GoogleApi.Redis.V1.Model.StateInfo) + field(:transitEncryptionMode) + field(:uid) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.Cluster do + def decode(value, options) do + GoogleApi.Redis.V1.Model.Cluster.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.Cluster do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/compliance.ex b/clients/redis/lib/google_api/redis/v1/model/compliance.ex new file mode 100644 index 0000000000..2b328bc463 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/compliance.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.Redis.V1.Model.Compliance do + @moduledoc """ + Contains compliance information about a security standard indicating unmet recommendations. + + ## Attributes + + * `standard` (*type:* `String.t`, *default:* `nil`) - Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP. + * `version` (*type:* `String.t`, *default:* `nil`) - Version of the standard or benchmark, for example, 1.1 + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :standard => String.t() | nil, + :version => String.t() | nil + } + + field(:standard) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.Compliance do + def decode(value, options) do + GoogleApi.Redis.V1.Model.Compliance.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.Compliance do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/custom_metadata_data.ex b/clients/redis/lib/google_api/redis/v1/model/custom_metadata_data.ex new file mode 100644 index 0000000000..059c79c38f --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/custom_metadata_data.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.Redis.V1.Model.CustomMetadataData do + @moduledoc """ + Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data + + ## Attributes + + * `databaseMetadata` (*type:* `list(GoogleApi.Redis.V1.Model.DatabaseMetadata.t)`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :databaseMetadata => list(GoogleApi.Redis.V1.Model.DatabaseMetadata.t()) | nil + } + + field(:databaseMetadata, as: GoogleApi.Redis.V1.Model.DatabaseMetadata, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.CustomMetadataData do + def decode(value, options) do + GoogleApi.Redis.V1.Model.CustomMetadataData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.CustomMetadataData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/database_metadata.ex b/clients/redis/lib/google_api/redis/v1/model/database_metadata.ex new file mode 100644 index 0000000000..b061718ac3 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/database_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.Redis.V1.Model.DatabaseMetadata do + @moduledoc """ + Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings. + + ## Attributes + + * `backupConfiguration` (*type:* `GoogleApi.Redis.V1.Model.BackupConfiguration.t`, *default:* `nil`) - Backup configuration for this database + * `backupRun` (*type:* `GoogleApi.Redis.V1.Model.BackupRun.t`, *default:* `nil`) - Information about the last backup attempt for this database + * `product` (*type:* `GoogleApi.Redis.V1.Model.Product.t`, *default:* `nil`) - + * `resourceId` (*type:* `GoogleApi.Redis.V1.Model.DatabaseResourceId.t`, *default:* `nil`) - + * `resourceName` (*type:* `String.t`, *default:* `nil`) - Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :backupConfiguration => GoogleApi.Redis.V1.Model.BackupConfiguration.t() | nil, + :backupRun => GoogleApi.Redis.V1.Model.BackupRun.t() | nil, + :product => GoogleApi.Redis.V1.Model.Product.t() | nil, + :resourceId => GoogleApi.Redis.V1.Model.DatabaseResourceId.t() | nil, + :resourceName => String.t() | nil + } + + field(:backupConfiguration, as: GoogleApi.Redis.V1.Model.BackupConfiguration) + field(:backupRun, as: GoogleApi.Redis.V1.Model.BackupRun) + field(:product, as: GoogleApi.Redis.V1.Model.Product) + field(:resourceId, as: GoogleApi.Redis.V1.Model.DatabaseResourceId) + field(:resourceName) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.DatabaseMetadata do + def decode(value, options) do + GoogleApi.Redis.V1.Model.DatabaseMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.DatabaseMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/database_resource_feed.ex b/clients/redis/lib/google_api/redis/v1/model/database_resource_feed.ex new file mode 100644 index 0000000000..5f7f2ae469 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/database_resource_feed.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.Redis.V1.Model.DatabaseResourceFeed do + @moduledoc """ + DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. + + ## Attributes + + * `feedTimestamp` (*type:* `DateTime.t`, *default:* `nil`) - Required. Timestamp when feed is generated. + * `feedType` (*type:* `String.t`, *default:* `nil`) - Required. Type feed to be ingested into condor + * `recommendationSignalData` (*type:* `GoogleApi.Redis.V1.Model.DatabaseResourceRecommendationSignalData.t`, *default:* `nil`) - More feed data would be added in subsequent CLs + * `resourceHealthSignalData` (*type:* `GoogleApi.Redis.V1.Model.DatabaseResourceHealthSignalData.t`, *default:* `nil`) - + * `resourceId` (*type:* `GoogleApi.Redis.V1.Model.DatabaseResourceId.t`, *default:* `nil`) - Primary key associated with the Resource. resource_id is available in individual feed level as well. + * `resourceMetadata` (*type:* `GoogleApi.Redis.V1.Model.DatabaseResourceMetadata.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :feedTimestamp => DateTime.t() | nil, + :feedType => String.t() | nil, + :recommendationSignalData => + GoogleApi.Redis.V1.Model.DatabaseResourceRecommendationSignalData.t() | nil, + :resourceHealthSignalData => + GoogleApi.Redis.V1.Model.DatabaseResourceHealthSignalData.t() | nil, + :resourceId => GoogleApi.Redis.V1.Model.DatabaseResourceId.t() | nil, + :resourceMetadata => GoogleApi.Redis.V1.Model.DatabaseResourceMetadata.t() | nil + } + + field(:feedTimestamp, as: DateTime) + field(:feedType) + + field(:recommendationSignalData, + as: GoogleApi.Redis.V1.Model.DatabaseResourceRecommendationSignalData + ) + + field(:resourceHealthSignalData, as: GoogleApi.Redis.V1.Model.DatabaseResourceHealthSignalData) + field(:resourceId, as: GoogleApi.Redis.V1.Model.DatabaseResourceId) + field(:resourceMetadata, as: GoogleApi.Redis.V1.Model.DatabaseResourceMetadata) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.DatabaseResourceFeed do + def decode(value, options) do + GoogleApi.Redis.V1.Model.DatabaseResourceFeed.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.DatabaseResourceFeed do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/database_resource_health_signal_data.ex b/clients/redis/lib/google_api/redis/v1/model/database_resource_health_signal_data.ex new file mode 100644 index 0000000000..8d278f51cf --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/database_resource_health_signal_data.ex @@ -0,0 +1,82 @@ +# 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.Redis.V1.Model.DatabaseResourceHealthSignalData do + @moduledoc """ + Common model for database resource health signal data. + + ## Attributes + + * `additionalMetadata` (*type:* `map()`, *default:* `nil`) - Any other additional metadata + * `compliance` (*type:* `list(GoogleApi.Redis.V1.Model.Compliance.t)`, *default:* `nil`) - Industry standards associated with this signal; if this signal is an issue, that could be a violation of the associated industry standard(s). For example, AUTO_BACKUP_DISABLED signal is associated with CIS GCP 1.1, CIS GCP 1.2, CIS GCP 1.3, NIST 800-53 and ISO-27001 compliance standards. If a database resource does not have automated backup enable, it will violate these following industry standards. + * `description` (*type:* `String.t`, *default:* `nil`) - Description associated with signal + * `eventTime` (*type:* `DateTime.t`, *default:* `nil`) - Required. The last time at which the event described by this signal took place + * `externalUri` (*type:* `String.t`, *default:* `nil`) - The external-uri of the signal, using which more information about this signal can be obtained. In GCP, this will take user to SCC page to get more details about signals. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc. + * `provider` (*type:* `String.t`, *default:* `nil`) - Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged + * `resourceContainer` (*type:* `String.t`, *default:* `nil`) - Closest parent container of this resource. In GCP, 'container' refers to a Cloud Resource Manager project. It must be resource name of a Cloud Resource Manager project with the format of "provider//", such as "projects/123". For GCP provided resources, number should be project number. + * `resourceName` (*type:* `String.t`, *default:* `nil`) - Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel + * `signalClass` (*type:* `String.t`, *default:* `nil`) - Required. The class of the signal, such as if it's a THREAT or VULNERABILITY. + * `signalId` (*type:* `String.t`, *default:* `nil`) - Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal. + * `signalType` (*type:* `String.t`, *default:* `nil`) - Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc. + * `state` (*type:* `String.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :additionalMetadata => map() | nil, + :compliance => list(GoogleApi.Redis.V1.Model.Compliance.t()) | nil, + :description => String.t() | nil, + :eventTime => DateTime.t() | nil, + :externalUri => String.t() | nil, + :name => String.t() | nil, + :provider => String.t() | nil, + :resourceContainer => String.t() | nil, + :resourceName => String.t() | nil, + :signalClass => String.t() | nil, + :signalId => String.t() | nil, + :signalType => String.t() | nil, + :state => String.t() | nil + } + + field(:additionalMetadata, type: :map) + field(:compliance, as: GoogleApi.Redis.V1.Model.Compliance, type: :list) + field(:description) + field(:eventTime, as: DateTime) + field(:externalUri) + field(:name) + field(:provider) + field(:resourceContainer) + field(:resourceName) + field(:signalClass) + field(:signalId) + field(:signalType) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.DatabaseResourceHealthSignalData do + def decode(value, options) do + GoogleApi.Redis.V1.Model.DatabaseResourceHealthSignalData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.DatabaseResourceHealthSignalData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/database_resource_id.ex b/clients/redis/lib/google_api/redis/v1/model/database_resource_id.ex new file mode 100644 index 0000000000..94fcef6ba9 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/database_resource_id.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.Redis.V1.Model.DatabaseResourceId do + @moduledoc """ + DatabaseResourceId will serve as primary key for any resource ingestion event. + + ## Attributes + + * `provider` (*type:* `String.t`, *default:* `nil`) - Required. Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged + * `providerDescription` (*type:* `String.t`, *default:* `nil`) - Optional. Needs to be used only when the provider is PROVIDER_OTHER. + * `resourceType` (*type:* `String.t`, *default:* `nil`) - Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel + * `uniqueId` (*type:* `String.t`, *default:* `nil`) - Required. A service-local token that distinguishes this resource from other resources within the same service. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :provider => String.t() | nil, + :providerDescription => String.t() | nil, + :resourceType => String.t() | nil, + :uniqueId => String.t() | nil + } + + field(:provider) + field(:providerDescription) + field(:resourceType) + field(:uniqueId) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.DatabaseResourceId do + def decode(value, options) do + GoogleApi.Redis.V1.Model.DatabaseResourceId.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.DatabaseResourceId do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/database_resource_metadata.ex b/clients/redis/lib/google_api/redis/v1/model/database_resource_metadata.ex new file mode 100644 index 0000000000..a6930a1ec6 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/database_resource_metadata.ex @@ -0,0 +1,95 @@ +# 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.Redis.V1.Model.DatabaseResourceMetadata do + @moduledoc """ + Common model for database resource instance metadata. + + ## Attributes + + * `availabilityConfiguration` (*type:* `GoogleApi.Redis.V1.Model.AvailabilityConfiguration.t`, *default:* `nil`) - Availability configuration for this instance + * `backupConfiguration` (*type:* `GoogleApi.Redis.V1.Model.BackupConfiguration.t`, *default:* `nil`) - Backup configuration for this instance + * `backupRun` (*type:* `GoogleApi.Redis.V1.Model.BackupRun.t`, *default:* `nil`) - Latest backup run information for this instance + * `creationTime` (*type:* `DateTime.t`, *default:* `nil`) - The creation time of the resource, i.e. the time when resource is created and recorded in partner service. + * `currentState` (*type:* `String.t`, *default:* `nil`) - Current state of the instance. + * `customMetadata` (*type:* `GoogleApi.Redis.V1.Model.CustomMetadataData.t`, *default:* `nil`) - Any custom metadata associated with the resource + * `entitlements` (*type:* `list(GoogleApi.Redis.V1.Model.Entitlement.t)`, *default:* `nil`) - Entitlements associated with the resource + * `expectedState` (*type:* `String.t`, *default:* `nil`) - The state that the instance is expected to be in. For example, an instance state can transition to UNHEALTHY due to wrong patch update, while the expected state will remain at the HEALTHY. + * `id` (*type:* `GoogleApi.Redis.V1.Model.DatabaseResourceId.t`, *default:* `nil`) - Required. Unique identifier for a Database resource + * `instanceType` (*type:* `String.t`, *default:* `nil`) - The type of the instance. Specified at creation time. + * `location` (*type:* `String.t`, *default:* `nil`) - The resource location. REQUIRED + * `primaryResourceId` (*type:* `GoogleApi.Redis.V1.Model.DatabaseResourceId.t`, *default:* `nil`) - Identifier for this resource's immediate parent/primary resource if the current resource is a replica or derived form of another Database resource. Else it would be NULL. REQUIRED if the immediate parent exists when first time resource is getting ingested, otherwise optional. + * `product` (*type:* `GoogleApi.Redis.V1.Model.Product.t`, *default:* `nil`) - The product this resource represents. + * `resourceContainer` (*type:* `String.t`, *default:* `nil`) - Closest parent Cloud Resource Manager container of this resource. It must be resource name of a Cloud Resource Manager project with the format of "/", such as "projects/123". For GCP provided resources, number should be project number. + * `resourceName` (*type:* `String.t`, *default:* `nil`) - Required. Different from DatabaseResourceId.unique_id, a resource name can be reused over time. That is, after a resource named "ABC" is deleted, the name "ABC" can be used to to create a new resource within the same source. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel + * `updationTime` (*type:* `DateTime.t`, *default:* `nil`) - The time at which the resource was updated and recorded at partner service. + * `userLabels` (*type:* `map()`, *default:* `nil`) - User-provided labels, represented as a dictionary where each label is a single key value pair. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :availabilityConfiguration => + GoogleApi.Redis.V1.Model.AvailabilityConfiguration.t() | nil, + :backupConfiguration => GoogleApi.Redis.V1.Model.BackupConfiguration.t() | nil, + :backupRun => GoogleApi.Redis.V1.Model.BackupRun.t() | nil, + :creationTime => DateTime.t() | nil, + :currentState => String.t() | nil, + :customMetadata => GoogleApi.Redis.V1.Model.CustomMetadataData.t() | nil, + :entitlements => list(GoogleApi.Redis.V1.Model.Entitlement.t()) | nil, + :expectedState => String.t() | nil, + :id => GoogleApi.Redis.V1.Model.DatabaseResourceId.t() | nil, + :instanceType => String.t() | nil, + :location => String.t() | nil, + :primaryResourceId => GoogleApi.Redis.V1.Model.DatabaseResourceId.t() | nil, + :product => GoogleApi.Redis.V1.Model.Product.t() | nil, + :resourceContainer => String.t() | nil, + :resourceName => String.t() | nil, + :updationTime => DateTime.t() | nil, + :userLabels => map() | nil + } + + field(:availabilityConfiguration, as: GoogleApi.Redis.V1.Model.AvailabilityConfiguration) + field(:backupConfiguration, as: GoogleApi.Redis.V1.Model.BackupConfiguration) + field(:backupRun, as: GoogleApi.Redis.V1.Model.BackupRun) + field(:creationTime, as: DateTime) + field(:currentState) + field(:customMetadata, as: GoogleApi.Redis.V1.Model.CustomMetadataData) + field(:entitlements, as: GoogleApi.Redis.V1.Model.Entitlement, type: :list) + field(:expectedState) + field(:id, as: GoogleApi.Redis.V1.Model.DatabaseResourceId) + field(:instanceType) + field(:location) + field(:primaryResourceId, as: GoogleApi.Redis.V1.Model.DatabaseResourceId) + field(:product, as: GoogleApi.Redis.V1.Model.Product) + field(:resourceContainer) + field(:resourceName) + field(:updationTime, as: DateTime) + field(:userLabels, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.DatabaseResourceMetadata do + def decode(value, options) do + GoogleApi.Redis.V1.Model.DatabaseResourceMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.DatabaseResourceMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/database_resource_recommendation_signal_data.ex b/clients/redis/lib/google_api/redis/v1/model/database_resource_recommendation_signal_data.ex new file mode 100644 index 0000000000..39598a8dea --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/database_resource_recommendation_signal_data.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.Redis.V1.Model.DatabaseResourceRecommendationSignalData do + @moduledoc """ + Common model for database resource recommendation signal data. + + ## Attributes + + * `additionalMetadata` (*type:* `map()`, *default:* `nil`) - Optional. Any other additional metadata specific to recommendation + * `lastRefreshTime` (*type:* `DateTime.t`, *default:* `nil`) - Required. last time recommendationw as refreshed + * `recommendationState` (*type:* `String.t`, *default:* `nil`) - Required. Recommendation state + * `recommender` (*type:* `String.t`, *default:* `nil`) - Required. Name of recommendation. Examples: organizations/1234/locations/us-central1/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations/9876 + * `recommenderId` (*type:* `String.t`, *default:* `nil`) - Required. ID of recommender. Examples: "google.cloudsql.instance.PerformanceRecommender" + * `recommenderSubtype` (*type:* `String.t`, *default:* `nil`) - Required. Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = "google.cloudsql.instance.PerformanceRecommender", recommender_subtype can be "MYSQL_HIGH_NUMBER_OF_OPEN_TABLES_BEST_PRACTICE"/"POSTGRES_HIGH_TRANSACTION_ID_UTILIZATION_BEST_PRACTICE" + * `resourceName` (*type:* `String.t`, *default:* `nil`) - Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel + * `signalType` (*type:* `String.t`, *default:* `nil`) - Required. Type of signal, for example, `SIGNAL_TYPE_IDLE`, `SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES`, etc. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :additionalMetadata => map() | nil, + :lastRefreshTime => DateTime.t() | nil, + :recommendationState => String.t() | nil, + :recommender => String.t() | nil, + :recommenderId => String.t() | nil, + :recommenderSubtype => String.t() | nil, + :resourceName => String.t() | nil, + :signalType => String.t() | nil + } + + field(:additionalMetadata, type: :map) + field(:lastRefreshTime, as: DateTime) + field(:recommendationState) + field(:recommender) + field(:recommenderId) + field(:recommenderSubtype) + field(:resourceName) + field(:signalType) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.DatabaseResourceRecommendationSignalData do + def decode(value, options) do + GoogleApi.Redis.V1.Model.DatabaseResourceRecommendationSignalData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.DatabaseResourceRecommendationSignalData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/discovery_endpoint.ex b/clients/redis/lib/google_api/redis/v1/model/discovery_endpoint.ex new file mode 100644 index 0000000000..a5c879b351 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/discovery_endpoint.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.Redis.V1.Model.DiscoveryEndpoint do + @moduledoc """ + Endpoints on each network, for Redis clients to connect to the cluster. + + ## Attributes + + * `address` (*type:* `String.t`, *default:* `nil`) - Output only. Address of the exposed Redis endpoint used by clients to connect to the service. The address could be either IP or hostname. + * `port` (*type:* `integer()`, *default:* `nil`) - Output only. The port number of the exposed Redis endpoint. + * `pscConfig` (*type:* `GoogleApi.Redis.V1.Model.PscConfig.t`, *default:* `nil`) - Output only. Customer configuration for where the endpoint is created and accessed from. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :address => String.t() | nil, + :port => integer() | nil, + :pscConfig => GoogleApi.Redis.V1.Model.PscConfig.t() | nil + } + + field(:address) + field(:port) + field(:pscConfig, as: GoogleApi.Redis.V1.Model.PscConfig) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.DiscoveryEndpoint do + def decode(value, options) do + GoogleApi.Redis.V1.Model.DiscoveryEndpoint.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.DiscoveryEndpoint do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/entitlement.ex b/clients/redis/lib/google_api/redis/v1/model/entitlement.ex new file mode 100644 index 0000000000..029e0a3f39 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/entitlement.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.Redis.V1.Model.Entitlement do + @moduledoc """ + Proto representing the access that a user has to a specific feature/service. NextId: 3. + + ## Attributes + + * `entitlementState` (*type:* `String.t`, *default:* `nil`) - The current state of user's accessibility to a feature/benefit. + * `type` (*type:* `String.t`, *default:* `nil`) - An enum that represents the type of this entitlement. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :entitlementState => String.t() | nil, + :type => String.t() | nil + } + + field(:entitlementState) + field(:type) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.Entitlement do + def decode(value, options) do + GoogleApi.Redis.V1.Model.Entitlement.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.Entitlement do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/instance.ex b/clients/redis/lib/google_api/redis/v1/model/instance.ex index eafb0cb15a..c96e6a7baa 100644 --- a/clients/redis/lib/google_api/redis/v1/model/instance.ex +++ b/clients/redis/lib/google_api/redis/v1/model/instance.ex @@ -24,11 +24,13 @@ defmodule GoogleApi.Redis.V1.Model.Instance do * `port` (*type:* `integer()`, *default:* `nil`) - Output only. The port number of the exposed Redis endpoint. * `reservedIpRange` (*type:* `String.t`, *default:* `nil`) - Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28. * `serverCaCerts` (*type:* `list(GoogleApi.Redis.V1.Model.TlsCertificate.t)`, *default:* `nil`) - Output only. List of server CA certificates for the instance. + * `maintenanceVersion` (*type:* `String.t`, *default:* `nil`) - Optional. The self service update maintenance version. The version is date based such as "20210712_00_00". * `statusMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Additional information about the current status of this instance, if available. * `redisConfigs` (*type:* `map()`, *default:* `nil`) - Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries * `displayName` (*type:* `String.t`, *default:* `nil`) - An arbitrary and optional user-provided name for the instance. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the instance was created. * `authorizedNetwork` (*type:* `String.t`, *default:* `nil`) - Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used. + * `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Optional. Output only. Reserved for future use. * `maintenanceSchedule` (*type:* `GoogleApi.Redis.V1.Model.MaintenanceSchedule.t`, *default:* `nil`) - Output only. Date and time of upcoming maintenance events which have been scheduled. * `suspensionReasons` (*type:* `list(String.t)`, *default:* `nil`) - Optional. reasons that causes instance in "SUSPENDED" state. * `alternativeLocationId` (*type:* `String.t`, *default:* `nil`) - Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service. @@ -44,15 +46,17 @@ defmodule GoogleApi.Redis.V1.Model.Instance do * `customerManagedKey` (*type:* `String.t`, *default:* `nil`) - Optional. The KMS key reference that the customer provides when trying to create the instance. * `nodes` (*type:* `list(GoogleApi.Redis.V1.Model.NodeInfo.t)`, *default:* `nil`) - Output only. Info per node. * `secondaryIpRange` (*type:* `String.t`, *default:* `nil`) - Optional. Additional IP range for node placement. Required when enabling read replicas on an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address range associated with the private service access connection, or "auto". + * `availableMaintenanceVersions` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The available maintenance versions that an instance could update to. * `currentLocationId` (*type:* `String.t`, *default:* `nil`) - Output only. The current zone where the Redis primary node is located. In basic tier, this will always be the same as [location_id]. In standard tier, this can be the zone of any node in the instance. * `transitEncryptionMode` (*type:* `String.t`, *default:* `nil`) - Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance. * `persistenceIamIdentity` (*type:* `String.t`, *default:* `nil`) - Output only. Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is "serviceAccount:". The value may change over time for a given instance so should be checked before each import/export operation. * `authEnabled` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. * `labels` (*type:* `map()`, *default:* `nil`) - Resource labels to represent user provided metadata + * `satisfiesPzi` (*type:* `boolean()`, *default:* `nil`) - Optional. Output only. Reserved for future use. * `tier` (*type:* `String.t`, *default:* `nil`) - Required. The service tier of the instance. * `readEndpoint` (*type:* `String.t`, *default:* `nil`) - Output only. Hostname or IP address of the exposed readonly Redis endpoint. Standard tier only. Targets all healthy replica nodes in instance. Replication is asynchronous and replica nodes will exhibit some lag behind the primary. Write requests must target 'host'. * `readEndpointPort` (*type:* `integer()`, *default:* `nil`) - Output only. The port number of the exposed readonly redis endpoint. Standard tier only. Write requests should target 'port'. - * `redisVersion` (*type:* `String.t`, *default:* `nil`) - Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility + * `redisVersion` (*type:* `String.t`, *default:* `nil`) - Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility * `REDIS_7_0` for Redis 7.0 compatibility * `maintenancePolicy` (*type:* `GoogleApi.Redis.V1.Model.MaintenancePolicy.t`, *default:* `nil`) - Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time. """ @@ -62,11 +66,13 @@ defmodule GoogleApi.Redis.V1.Model.Instance do :port => integer() | nil, :reservedIpRange => String.t() | nil, :serverCaCerts => list(GoogleApi.Redis.V1.Model.TlsCertificate.t()) | nil, + :maintenanceVersion => String.t() | nil, :statusMessage => String.t() | nil, :redisConfigs => map() | nil, :displayName => String.t() | nil, :createTime => DateTime.t() | nil, :authorizedNetwork => String.t() | nil, + :satisfiesPzs => boolean() | nil, :maintenanceSchedule => GoogleApi.Redis.V1.Model.MaintenanceSchedule.t() | nil, :suspensionReasons => list(String.t()) | nil, :alternativeLocationId => String.t() | nil, @@ -82,11 +88,13 @@ defmodule GoogleApi.Redis.V1.Model.Instance do :customerManagedKey => String.t() | nil, :nodes => list(GoogleApi.Redis.V1.Model.NodeInfo.t()) | nil, :secondaryIpRange => String.t() | nil, + :availableMaintenanceVersions => list(String.t()) | nil, :currentLocationId => String.t() | nil, :transitEncryptionMode => String.t() | nil, :persistenceIamIdentity => String.t() | nil, :authEnabled => boolean() | nil, :labels => map() | nil, + :satisfiesPzi => boolean() | nil, :tier => String.t() | nil, :readEndpoint => String.t() | nil, :readEndpointPort => integer() | nil, @@ -97,11 +105,13 @@ defmodule GoogleApi.Redis.V1.Model.Instance do field(:port) field(:reservedIpRange) field(:serverCaCerts, as: GoogleApi.Redis.V1.Model.TlsCertificate, type: :list) + field(:maintenanceVersion) field(:statusMessage) field(:redisConfigs, type: :map) field(:displayName) field(:createTime, as: DateTime) field(:authorizedNetwork) + field(:satisfiesPzs) field(:maintenanceSchedule, as: GoogleApi.Redis.V1.Model.MaintenanceSchedule) field(:suspensionReasons, type: :list) field(:alternativeLocationId) @@ -117,11 +127,13 @@ defmodule GoogleApi.Redis.V1.Model.Instance do field(:customerManagedKey) field(:nodes, as: GoogleApi.Redis.V1.Model.NodeInfo, type: :list) field(:secondaryIpRange) + field(:availableMaintenanceVersions, type: :list) field(:currentLocationId) field(:transitEncryptionMode) field(:persistenceIamIdentity) field(:authEnabled) field(:labels, type: :map) + field(:satisfiesPzi) field(:tier) field(:readEndpoint) field(:readEndpointPort) diff --git a/clients/redis/lib/google_api/redis/v1/model/list_clusters_response.ex b/clients/redis/lib/google_api/redis/v1/model/list_clusters_response.ex new file mode 100644 index 0000000000..5bf156a7b5 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/list_clusters_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.Redis.V1.Model.ListClustersResponse do + @moduledoc """ + Response for ListClusters. + + ## Attributes + + * `clusters` (*type:* `list(GoogleApi.Redis.V1.Model.Cluster.t)`, *default:* `nil`) - A list of Redis clusters in the project in the specified location, or across all locations. If the `location_id` in the parent field of the request is "-", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder Redis entry is included in the response with the `name` field set to a value of the form `projects/{project_id}/locations/{location_id}/clusters/`- and the `status` field set to ERROR and `status_message` field set to "location not available for ListClusters". + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Token to retrieve the next page of results, or empty if there are no more results in the list. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :clusters => list(GoogleApi.Redis.V1.Model.Cluster.t()) | nil, + :nextPageToken => String.t() | nil, + :unreachable => list(String.t()) | nil + } + + field(:clusters, as: GoogleApi.Redis.V1.Model.Cluster, type: :list) + field(:nextPageToken) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.ListClustersResponse do + def decode(value, options) do + GoogleApi.Redis.V1.Model.ListClustersResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.ListClustersResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/location.ex b/clients/redis/lib/google_api/redis/v1/model/location.ex index 1ca7e59565..2e2495c201 100644 --- a/clients/redis/lib/google_api/redis/v1/model/location.ex +++ b/clients/redis/lib/google_api/redis/v1/model/location.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.Redis.V1.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/redis/lib/google_api/redis/v1/model/managed_certificate_authority.ex b/clients/redis/lib/google_api/redis/v1/model/managed_certificate_authority.ex new file mode 100644 index 0000000000..e4a97b577e --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/managed_certificate_authority.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.Redis.V1.Model.ManagedCertificateAuthority do + @moduledoc """ + + + ## Attributes + + * `caCerts` (*type:* `list(GoogleApi.Redis.V1.Model.CertChain.t)`, *default:* `nil`) - The PEM encoded CA certificate chains for redis managed server authentication + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :caCerts => list(GoogleApi.Redis.V1.Model.CertChain.t()) | nil + } + + field(:caCerts, as: GoogleApi.Redis.V1.Model.CertChain, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.ManagedCertificateAuthority do + def decode(value, options) do + GoogleApi.Redis.V1.Model.ManagedCertificateAuthority.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.ManagedCertificateAuthority do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/operation.ex b/clients/redis/lib/google_api/redis/v1/model/operation.ex index c09e8696a5..a89f1ac420 100644 --- a/clients/redis/lib/google_api/redis/v1/model/operation.ex +++ b/clients/redis/lib/google_api/redis/v1/model/operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.Redis.V1.Model.Operation do * `error` (*type:* `GoogleApi.Redis.V1.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. * `metadata` (*type:* `map()`, *default:* `nil`) - { `createTime`: The time the operation was created. `endTime`: The time the operation finished running. `target`: Server-defined resource path for the target of the operation. `verb`: Name of the verb executed by the operation. `statusDetail`: Human-readable status of the operation, if any. `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. `apiVersion`: API version used to start the operation. } * `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/redis/lib/google_api/redis/v1/model/operation_error.ex b/clients/redis/lib/google_api/redis/v1/model/operation_error.ex new file mode 100644 index 0000000000..1193289cc3 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/operation_error.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.Redis.V1.Model.OperationError do + @moduledoc """ + An error that occurred during a backup creation operation. + + ## Attributes + + * `code` (*type:* `String.t`, *default:* `nil`) - Identifies the specific error that occurred. REQUIRED + * `errorType` (*type:* `String.t`, *default:* `nil`) - + * `message` (*type:* `String.t`, *default:* `nil`) - Additional information about the error encountered. REQUIRED + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :code => String.t() | nil, + :errorType => String.t() | nil, + :message => String.t() | nil + } + + field(:code) + field(:errorType) + field(:message) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.OperationError do + def decode(value, options) do + GoogleApi.Redis.V1.Model.OperationError.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.OperationError do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/operation_metadata.ex b/clients/redis/lib/google_api/redis/v1/model/operation_metadata.ex new file mode 100644 index 0000000000..759d85f557 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/operation_metadata.ex @@ -0,0 +1,64 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Redis.V1.Model.OperationMetadata do + @moduledoc """ + Pre-defined metadata fields. + + ## Attributes + + * `apiVersion` (*type:* `String.t`, *default:* `nil`) - Output only. API version used to start the operation. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation was created. + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation finished running. + * `requestedCancellation` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * `statusMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Human-readable status of the operation, if any. + * `target` (*type:* `String.t`, *default:* `nil`) - Output only. Server-defined resource path for the target of the operation. + * `verb` (*type:* `String.t`, *default:* `nil`) - Output only. Name of the verb executed by the operation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :apiVersion => String.t() | nil, + :createTime => DateTime.t() | nil, + :endTime => DateTime.t() | nil, + :requestedCancellation => boolean() | nil, + :statusMessage => String.t() | nil, + :target => String.t() | nil, + :verb => String.t() | nil + } + + field(:apiVersion) + field(:createTime, as: DateTime) + field(:endTime, as: DateTime) + field(:requestedCancellation) + field(:statusMessage) + field(:target) + field(:verb) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.OperationMetadata do + def decode(value, options) do + GoogleApi.Redis.V1.Model.OperationMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.OperationMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/product.ex b/clients/redis/lib/google_api/redis/v1/model/product.ex new file mode 100644 index 0000000000..21d73ca58f --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/product.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Redis.V1.Model.Product do + @moduledoc """ + Product specification for Condor resources. + + ## Attributes + + * `engine` (*type:* `String.t`, *default:* `nil`) - The specific engine that the underlying database is running. + * `type` (*type:* `String.t`, *default:* `nil`) - Type of specific database product. It could be CloudSQL, AlloyDB etc.. + * `version` (*type:* `String.t`, *default:* `nil`) - Version of the underlying database engine. Example values: For MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" etc.. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :engine => String.t() | nil, + :type => String.t() | nil, + :version => String.t() | nil + } + + field(:engine) + field(:type) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.Product do + def decode(value, options) do + GoogleApi.Redis.V1.Model.Product.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.Product do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/psc_config.ex b/clients/redis/lib/google_api/redis/v1/model/psc_config.ex new file mode 100644 index 0000000000..ca3a15feff --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/psc_config.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.Redis.V1.Model.PscConfig do + @moduledoc """ + + + ## Attributes + + * `network` (*type:* `String.t`, *default:* `nil`) - Required. The network where the IP address of the discovery endpoint will be reserved, in the form of projects/{network_project}/global/networks/{network_id}. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :network => String.t() | nil + } + + field(:network) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.PscConfig do + def decode(value, options) do + GoogleApi.Redis.V1.Model.PscConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.PscConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/psc_connection.ex b/clients/redis/lib/google_api/redis/v1/model/psc_connection.ex new file mode 100644 index 0000000000..10d473cf2e --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/psc_connection.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.Redis.V1.Model.PscConnection do + @moduledoc """ + Details of consumer resources in a PSC connection. + + ## Attributes + + * `address` (*type:* `String.t`, *default:* `nil`) - Output only. The IP allocated on the consumer network for the PSC forwarding rule. + * `forwardingRule` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + * `network` (*type:* `String.t`, *default:* `nil`) - The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}. + * `projectId` (*type:* `String.t`, *default:* `nil`) - Output only. The consumer project_id where the forwarding rule is created from. + * `pscConnectionId` (*type:* `String.t`, *default:* `nil`) - Output only. The PSC connection id of the forwarding rule connected to the service attachment. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :address => String.t() | nil, + :forwardingRule => String.t() | nil, + :network => String.t() | nil, + :projectId => String.t() | nil, + :pscConnectionId => String.t() | nil + } + + field(:address) + field(:forwardingRule) + field(:network) + field(:projectId) + field(:pscConnectionId) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.PscConnection do + def decode(value, options) do + GoogleApi.Redis.V1.Model.PscConnection.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.PscConnection do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/retention_settings.ex b/clients/redis/lib/google_api/redis/v1/model/retention_settings.ex new file mode 100644 index 0000000000..66cc00b874 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/retention_settings.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.Redis.V1.Model.RetentionSettings do + @moduledoc """ + + + ## Attributes + + * `quantityBasedRetention` (*type:* `integer()`, *default:* `nil`) - + * `retentionUnit` (*type:* `String.t`, *default:* `nil`) - The unit that 'retained_backups' represents. + * `timeBasedRetention` (*type:* `String.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :quantityBasedRetention => integer() | nil, + :retentionUnit => String.t() | nil, + :timeBasedRetention => String.t() | nil + } + + field(:quantityBasedRetention) + field(:retentionUnit) + field(:timeBasedRetention) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.RetentionSettings do + def decode(value, options) do + GoogleApi.Redis.V1.Model.RetentionSettings.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.RetentionSettings do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/state_info.ex b/clients/redis/lib/google_api/redis/v1/model/state_info.ex new file mode 100644 index 0000000000..475251c5ac --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/state_info.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.Redis.V1.Model.StateInfo do + @moduledoc """ + Represents additional information about the state of the cluster. + + ## Attributes + + * `updateInfo` (*type:* `GoogleApi.Redis.V1.Model.UpdateInfo.t`, *default:* `nil`) - Describes ongoing update on the cluster when cluster state is UPDATING. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :updateInfo => GoogleApi.Redis.V1.Model.UpdateInfo.t() | nil + } + + field(:updateInfo, as: GoogleApi.Redis.V1.Model.UpdateInfo) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.StateInfo do + def decode(value, options) do + GoogleApi.Redis.V1.Model.StateInfo.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.StateInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1/model/update_info.ex b/clients/redis/lib/google_api/redis/v1/model/update_info.ex new file mode 100644 index 0000000000..50ca4bf71a --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1/model/update_info.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.Redis.V1.Model.UpdateInfo do + @moduledoc """ + Represents information about an updating cluster. + + ## Attributes + + * `targetReplicaCount` (*type:* `integer()`, *default:* `nil`) - Target number of replica nodes per shard. + * `targetShardCount` (*type:* `integer()`, *default:* `nil`) - Target number of shards for redis cluster + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :targetReplicaCount => integer() | nil, + :targetShardCount => integer() | nil + } + + field(:targetReplicaCount) + field(:targetShardCount) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1.Model.UpdateInfo do + def decode(value, options) do + GoogleApi.Redis.V1.Model.UpdateInfo.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1.Model.UpdateInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/api/projects.ex b/clients/redis/lib/google_api/redis/v1beta1/api/projects.ex index 71c3cc8576..677acadd42 100644 --- a/clients/redis/lib/google_api/redis/v1beta1/api/projects.ex +++ b/clients/redis/lib/google_api/redis/v1beta1/api/projects.ex @@ -165,6 +165,496 @@ defmodule GoogleApi.Redis.V1beta1.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.Redis.V1beta1.Model.ListLocationsResponse{}]) end + @doc """ + Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * `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"). + * `:clusterId` (*type:* `String.t`) - Required. The logical name of the Redis cluster in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the customer project / location + * `:requestId` (*type:* `String.t`) - Idempotent request UUID. + * `:body` (*type:* `GoogleApi.Redis.V1beta1.Model.Cluster.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Redis.V1beta1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_create( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1beta1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_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, + :clusterId => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", %{ + "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.Redis.V1beta1.Model.Operation{}]) + end + + @doc """ + Deletes a specific Redis cluster. Cluster stops serving and data is deleted. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `clusters_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"). + * `:requestId` (*type:* `String.t`) - Idempotent request UUID. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Redis.V1beta1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1beta1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_delete( + connection, + projects_id, + locations_id, + clusters_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, + :requestId => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "clustersId" => URI.encode(clusters_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.Redis.V1beta1.Model.Operation{}]) + end + + @doc """ + Gets the details of a specific Redis cluster. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `clusters_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.Redis.V1beta1.Model.Cluster{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1beta1.Model.Cluster.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_get( + connection, + projects_id, + locations_id, + clusters_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "clustersId" => URI.encode(clusters_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.Redis.V1beta1.Model.Cluster{}]) + end + + @doc """ + Gets the details of certificate authority information for Redis cluster. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Redis cluster certificate authority resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` where `location_id` refers to a GCP region. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `clusters_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.Redis.V1beta1.Model.CertificateAuthority{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_get_certificate_authority( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1beta1.Model.CertificateAuthority.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_get_certificate_authority( + connection, + projects_id, + locations_id, + clusters_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/certificateAuthority", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "clustersId" => URI.encode(clusters_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.Redis.V1beta1.Model.CertificateAuthority{}]) + end + + @doc """ + Lists all Redis clusters owned by a project in either the specified location (region) or all locations. The location should have the following format: * `projects/{project_id}/locations/{location_id}` If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region. + * `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()`) - The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more clusters left to be queried. + * `:pageToken` (*type:* `String.t`) - The `next_page_token` value returned from a previous ListClusters request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Redis.V1beta1.Model.ListClustersResponse{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1beta1.Model.ListClustersResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_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("/v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", %{ + "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.Redis.V1beta1.Model.ListClustersResponse{}]) + end + + @doc """ + Updates the metadata and configuration of a specific Redis cluster. Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Redis.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `cluster.name`. Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * `locations_id` (*type:* `String.t`) - Part of `cluster.name`. See documentation of `projectsId`. + * `clusters_id` (*type:* `String.t`) - Part of `cluster.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"). + * `:requestId` (*type:* `String.t`) - Idempotent request UUID. + * `:updateMask` (*type:* `String.t`) - Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Cluster: * `size_gb` * `replica_count` + * `:body` (*type:* `GoogleApi.Redis.V1beta1.Model.Cluster.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Redis.V1beta1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec redis_projects_locations_clusters_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Redis.V1beta1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def redis_projects_locations_clusters_patch( + connection, + projects_id, + locations_id, + clusters_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, + :requestId => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "clustersId" => URI.encode(clusters_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.Redis.V1beta1.Model.Operation{}]) + end + @doc """ Creates a Redis instance based on the specified tier and memory size. By default, the instance is accessible from the project's [default network](https://cloud.google.com/vpc/docs/vpc). The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. The completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. @@ -1308,7 +1798,7 @@ defmodule GoogleApi.Redis.V1beta1.Api.Projects 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/redis/lib/google_api/redis/v1beta1/metadata.ex b/clients/redis/lib/google_api/redis/v1beta1/metadata.ex index 9fb29fb3fd..dd5355487a 100644 --- a/clients/redis/lib/google_api/redis/v1beta1/metadata.ex +++ b/clients/redis/lib/google_api/redis/v1beta1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Redis.V1beta1 do API client metadata for GoogleApi.Redis.V1beta1. """ - @discovery_revision "20221007" + @discovery_revision "20240229" def discovery_revision(), do: @discovery_revision end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/availability_configuration.ex b/clients/redis/lib/google_api/redis/v1beta1/model/availability_configuration.ex new file mode 100644 index 0000000000..bad353f45e --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/availability_configuration.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.Redis.V1beta1.Model.AvailabilityConfiguration do + @moduledoc """ + Configuration for availability of database instance + + ## Attributes + + * `availabilityType` (*type:* `String.t`, *default:* `nil`) - Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available). + * `externalReplicaConfigured` (*type:* `boolean()`, *default:* `nil`) - + * `promotableReplicaConfigured` (*type:* `boolean()`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :availabilityType => String.t() | nil, + :externalReplicaConfigured => boolean() | nil, + :promotableReplicaConfigured => boolean() | nil + } + + field(:availabilityType) + field(:externalReplicaConfigured) + field(:promotableReplicaConfigured) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.AvailabilityConfiguration do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.AvailabilityConfiguration.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.AvailabilityConfiguration do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/backup_configuration.ex b/clients/redis/lib/google_api/redis/v1beta1/model/backup_configuration.ex new file mode 100644 index 0000000000..aef3c320f4 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/backup_configuration.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.Redis.V1beta1.Model.BackupConfiguration do + @moduledoc """ + Configuration for automatic backups + + ## Attributes + + * `automatedBackupEnabled` (*type:* `boolean()`, *default:* `nil`) - Whether customer visible automated backups are enabled on the instance. + * `backupRetentionSettings` (*type:* `GoogleApi.Redis.V1beta1.Model.RetentionSettings.t`, *default:* `nil`) - Backup retention settings. + * `pointInTimeRecoveryEnabled` (*type:* `boolean()`, *default:* `nil`) - Whether point-in-time recovery is enabled. This is optional field, if the database service does not have this feature or metadata is not available in control plane, this can be omitted. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :automatedBackupEnabled => boolean() | nil, + :backupRetentionSettings => GoogleApi.Redis.V1beta1.Model.RetentionSettings.t() | nil, + :pointInTimeRecoveryEnabled => boolean() | nil + } + + field(:automatedBackupEnabled) + field(:backupRetentionSettings, as: GoogleApi.Redis.V1beta1.Model.RetentionSettings) + field(:pointInTimeRecoveryEnabled) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.BackupConfiguration do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.BackupConfiguration.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.BackupConfiguration do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/backup_run.ex b/clients/redis/lib/google_api/redis/v1beta1/model/backup_run.ex new file mode 100644 index 0000000000..24ad077a70 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/backup_run.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.Redis.V1beta1.Model.BackupRun do + @moduledoc """ + A backup run. + + ## Attributes + + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - The time the backup operation completed. REQUIRED + * `error` (*type:* `GoogleApi.Redis.V1beta1.Model.OperationError.t`, *default:* `nil`) - Information about why the backup operation failed. This is only present if the run has the FAILED status. OPTIONAL + * `startTime` (*type:* `DateTime.t`, *default:* `nil`) - The time the backup operation started. REQUIRED + * `status` (*type:* `String.t`, *default:* `nil`) - The status of this run. REQUIRED + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :endTime => DateTime.t() | nil, + :error => GoogleApi.Redis.V1beta1.Model.OperationError.t() | nil, + :startTime => DateTime.t() | nil, + :status => String.t() | nil + } + + field(:endTime, as: DateTime) + field(:error, as: GoogleApi.Redis.V1beta1.Model.OperationError) + field(:startTime, as: DateTime) + field(:status) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.BackupRun do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.BackupRun.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.BackupRun do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/cert_chain.ex b/clients/redis/lib/google_api/redis/v1beta1/model/cert_chain.ex new file mode 100644 index 0000000000..23cbd9859f --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/cert_chain.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.Redis.V1beta1.Model.CertChain do + @moduledoc """ + + + ## Attributes + + * `certificates` (*type:* `list(String.t)`, *default:* `nil`) - The certificates that form the CA chain, from leaf to root order. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :certificates => list(String.t()) | nil + } + + field(:certificates, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.CertChain do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.CertChain.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.CertChain do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/certificate_authority.ex b/clients/redis/lib/google_api/redis/v1beta1/model/certificate_authority.ex new file mode 100644 index 0000000000..9831055c40 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/certificate_authority.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.Redis.V1beta1.Model.CertificateAuthority do + @moduledoc """ + Redis cluster certificate authority + + ## Attributes + + * `managedServerCa` (*type:* `GoogleApi.Redis.V1beta1.Model.ManagedCertificateAuthority.t`, *default:* `nil`) - + * `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Unique name of the resource in this scope including project, location and cluster using the form: `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :managedServerCa => GoogleApi.Redis.V1beta1.Model.ManagedCertificateAuthority.t() | nil, + :name => String.t() | nil + } + + field(:managedServerCa, as: GoogleApi.Redis.V1beta1.Model.ManagedCertificateAuthority) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.CertificateAuthority do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.CertificateAuthority.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.CertificateAuthority do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/cluster.ex b/clients/redis/lib/google_api/redis/v1beta1/model/cluster.ex new file mode 100644 index 0000000000..d4da1ba2a5 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/cluster.ex @@ -0,0 +1,82 @@ +# 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.Redis.V1beta1.Model.Cluster do + @moduledoc """ + A cluster instance. + + ## Attributes + + * `authorizationMode` (*type:* `String.t`, *default:* `nil`) - Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp associated with the cluster creation request. + * `discoveryEndpoints` (*type:* `list(GoogleApi.Redis.V1beta1.Model.DiscoveryEndpoint.t)`, *default:* `nil`) - Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * `pscConfigs` (*type:* `list(GoogleApi.Redis.V1beta1.Model.PscConfig.t)`, *default:* `nil`) - Required. Each PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation. Currently, only one PscConfig is supported. + * `pscConnections` (*type:* `list(GoogleApi.Redis.V1beta1.Model.PscConnection.t)`, *default:* `nil`) - Output only. PSC connections for discovery of the cluster topology and accessing the cluster. + * `replicaCount` (*type:* `integer()`, *default:* `nil`) - Optional. The number of replica nodes per shard. + * `shardCount` (*type:* `integer()`, *default:* `nil`) - Required. Number of shards for the Redis cluster. + * `sizeGb` (*type:* `integer()`, *default:* `nil`) - Output only. Redis memory size in GB for the entire cluster rounded up to the next integer. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED + * `stateInfo` (*type:* `GoogleApi.Redis.V1beta1.Model.StateInfo.t`, *default:* `nil`) - Output only. Additional information about the current state of the cluster. + * `transitEncryptionMode` (*type:* `String.t`, *default:* `nil`) - Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster. + * `uid` (*type:* `String.t`, *default:* `nil`) - Output only. System assigned, unique identifier for the cluster. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :authorizationMode => String.t() | nil, + :createTime => DateTime.t() | nil, + :discoveryEndpoints => list(GoogleApi.Redis.V1beta1.Model.DiscoveryEndpoint.t()) | nil, + :name => String.t() | nil, + :pscConfigs => list(GoogleApi.Redis.V1beta1.Model.PscConfig.t()) | nil, + :pscConnections => list(GoogleApi.Redis.V1beta1.Model.PscConnection.t()) | nil, + :replicaCount => integer() | nil, + :shardCount => integer() | nil, + :sizeGb => integer() | nil, + :state => String.t() | nil, + :stateInfo => GoogleApi.Redis.V1beta1.Model.StateInfo.t() | nil, + :transitEncryptionMode => String.t() | nil, + :uid => String.t() | nil + } + + field(:authorizationMode) + field(:createTime, as: DateTime) + field(:discoveryEndpoints, as: GoogleApi.Redis.V1beta1.Model.DiscoveryEndpoint, type: :list) + field(:name) + field(:pscConfigs, as: GoogleApi.Redis.V1beta1.Model.PscConfig, type: :list) + field(:pscConnections, as: GoogleApi.Redis.V1beta1.Model.PscConnection, type: :list) + field(:replicaCount) + field(:shardCount) + field(:sizeGb) + field(:state) + field(:stateInfo, as: GoogleApi.Redis.V1beta1.Model.StateInfo) + field(:transitEncryptionMode) + field(:uid) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.Cluster do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.Cluster.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.Cluster do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/compliance.ex b/clients/redis/lib/google_api/redis/v1beta1/model/compliance.ex new file mode 100644 index 0000000000..0fa3d1da93 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/compliance.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.Redis.V1beta1.Model.Compliance do + @moduledoc """ + Contains compliance information about a security standard indicating unmet recommendations. + + ## Attributes + + * `standard` (*type:* `String.t`, *default:* `nil`) - Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP. + * `version` (*type:* `String.t`, *default:* `nil`) - Version of the standard or benchmark, for example, 1.1 + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :standard => String.t() | nil, + :version => String.t() | nil + } + + field(:standard) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.Compliance do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.Compliance.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.Compliance do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/custom_metadata_data.ex b/clients/redis/lib/google_api/redis/v1beta1/model/custom_metadata_data.ex new file mode 100644 index 0000000000..c7ac564d43 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/custom_metadata_data.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.Redis.V1beta1.Model.CustomMetadataData do + @moduledoc """ + Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data + + ## Attributes + + * `databaseMetadata` (*type:* `list(GoogleApi.Redis.V1beta1.Model.DatabaseMetadata.t)`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :databaseMetadata => list(GoogleApi.Redis.V1beta1.Model.DatabaseMetadata.t()) | nil + } + + field(:databaseMetadata, as: GoogleApi.Redis.V1beta1.Model.DatabaseMetadata, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.CustomMetadataData do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.CustomMetadataData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.CustomMetadataData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/database_metadata.ex b/clients/redis/lib/google_api/redis/v1beta1/model/database_metadata.ex new file mode 100644 index 0000000000..de23471288 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/database_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.Redis.V1beta1.Model.DatabaseMetadata do + @moduledoc """ + Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings. + + ## Attributes + + * `backupConfiguration` (*type:* `GoogleApi.Redis.V1beta1.Model.BackupConfiguration.t`, *default:* `nil`) - Backup configuration for this database + * `backupRun` (*type:* `GoogleApi.Redis.V1beta1.Model.BackupRun.t`, *default:* `nil`) - Information about the last backup attempt for this database + * `product` (*type:* `GoogleApi.Redis.V1beta1.Model.Product.t`, *default:* `nil`) - + * `resourceId` (*type:* `GoogleApi.Redis.V1beta1.Model.DatabaseResourceId.t`, *default:* `nil`) - + * `resourceName` (*type:* `String.t`, *default:* `nil`) - Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :backupConfiguration => GoogleApi.Redis.V1beta1.Model.BackupConfiguration.t() | nil, + :backupRun => GoogleApi.Redis.V1beta1.Model.BackupRun.t() | nil, + :product => GoogleApi.Redis.V1beta1.Model.Product.t() | nil, + :resourceId => GoogleApi.Redis.V1beta1.Model.DatabaseResourceId.t() | nil, + :resourceName => String.t() | nil + } + + field(:backupConfiguration, as: GoogleApi.Redis.V1beta1.Model.BackupConfiguration) + field(:backupRun, as: GoogleApi.Redis.V1beta1.Model.BackupRun) + field(:product, as: GoogleApi.Redis.V1beta1.Model.Product) + field(:resourceId, as: GoogleApi.Redis.V1beta1.Model.DatabaseResourceId) + field(:resourceName) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.DatabaseMetadata do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.DatabaseMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.DatabaseMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_feed.ex b/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_feed.ex new file mode 100644 index 0000000000..8f7de817a8 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_feed.ex @@ -0,0 +1,70 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Redis.V1beta1.Model.DatabaseResourceFeed do + @moduledoc """ + DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform. + + ## Attributes + + * `feedTimestamp` (*type:* `DateTime.t`, *default:* `nil`) - Required. Timestamp when feed is generated. + * `feedType` (*type:* `String.t`, *default:* `nil`) - Required. Type feed to be ingested into condor + * `recommendationSignalData` (*type:* `GoogleApi.Redis.V1beta1.Model.DatabaseResourceRecommendationSignalData.t`, *default:* `nil`) - More feed data would be added in subsequent CLs + * `resourceHealthSignalData` (*type:* `GoogleApi.Redis.V1beta1.Model.DatabaseResourceHealthSignalData.t`, *default:* `nil`) - + * `resourceId` (*type:* `GoogleApi.Redis.V1beta1.Model.DatabaseResourceId.t`, *default:* `nil`) - Primary key associated with the Resource. resource_id is available in individual feed level as well. + * `resourceMetadata` (*type:* `GoogleApi.Redis.V1beta1.Model.DatabaseResourceMetadata.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :feedTimestamp => DateTime.t() | nil, + :feedType => String.t() | nil, + :recommendationSignalData => + GoogleApi.Redis.V1beta1.Model.DatabaseResourceRecommendationSignalData.t() | nil, + :resourceHealthSignalData => + GoogleApi.Redis.V1beta1.Model.DatabaseResourceHealthSignalData.t() | nil, + :resourceId => GoogleApi.Redis.V1beta1.Model.DatabaseResourceId.t() | nil, + :resourceMetadata => GoogleApi.Redis.V1beta1.Model.DatabaseResourceMetadata.t() | nil + } + + field(:feedTimestamp, as: DateTime) + field(:feedType) + + field(:recommendationSignalData, + as: GoogleApi.Redis.V1beta1.Model.DatabaseResourceRecommendationSignalData + ) + + field(:resourceHealthSignalData, + as: GoogleApi.Redis.V1beta1.Model.DatabaseResourceHealthSignalData + ) + + field(:resourceId, as: GoogleApi.Redis.V1beta1.Model.DatabaseResourceId) + field(:resourceMetadata, as: GoogleApi.Redis.V1beta1.Model.DatabaseResourceMetadata) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.DatabaseResourceFeed do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.DatabaseResourceFeed.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.DatabaseResourceFeed do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_health_signal_data.ex b/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_health_signal_data.ex new file mode 100644 index 0000000000..278d385514 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_health_signal_data.ex @@ -0,0 +1,82 @@ +# 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.Redis.V1beta1.Model.DatabaseResourceHealthSignalData do + @moduledoc """ + Common model for database resource health signal data. + + ## Attributes + + * `additionalMetadata` (*type:* `map()`, *default:* `nil`) - Any other additional metadata + * `compliance` (*type:* `list(GoogleApi.Redis.V1beta1.Model.Compliance.t)`, *default:* `nil`) - Industry standards associated with this signal; if this signal is an issue, that could be a violation of the associated industry standard(s). For example, AUTO_BACKUP_DISABLED signal is associated with CIS GCP 1.1, CIS GCP 1.2, CIS GCP 1.3, NIST 800-53 and ISO-27001 compliance standards. If a database resource does not have automated backup enable, it will violate these following industry standards. + * `description` (*type:* `String.t`, *default:* `nil`) - Description associated with signal + * `eventTime` (*type:* `DateTime.t`, *default:* `nil`) - Required. The last time at which the event described by this signal took place + * `externalUri` (*type:* `String.t`, *default:* `nil`) - The external-uri of the signal, using which more information about this signal can be obtained. In GCP, this will take user to SCC page to get more details about signals. + * `name` (*type:* `String.t`, *default:* `nil`) - Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc. + * `provider` (*type:* `String.t`, *default:* `nil`) - Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged + * `resourceContainer` (*type:* `String.t`, *default:* `nil`) - Closest parent container of this resource. In GCP, 'container' refers to a Cloud Resource Manager project. It must be resource name of a Cloud Resource Manager project with the format of "provider//", such as "projects/123". For GCP provided resources, number should be project number. + * `resourceName` (*type:* `String.t`, *default:* `nil`) - Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel + * `signalClass` (*type:* `String.t`, *default:* `nil`) - Required. The class of the signal, such as if it's a THREAT or VULNERABILITY. + * `signalId` (*type:* `String.t`, *default:* `nil`) - Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal. + * `signalType` (*type:* `String.t`, *default:* `nil`) - Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc. + * `state` (*type:* `String.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :additionalMetadata => map() | nil, + :compliance => list(GoogleApi.Redis.V1beta1.Model.Compliance.t()) | nil, + :description => String.t() | nil, + :eventTime => DateTime.t() | nil, + :externalUri => String.t() | nil, + :name => String.t() | nil, + :provider => String.t() | nil, + :resourceContainer => String.t() | nil, + :resourceName => String.t() | nil, + :signalClass => String.t() | nil, + :signalId => String.t() | nil, + :signalType => String.t() | nil, + :state => String.t() | nil + } + + field(:additionalMetadata, type: :map) + field(:compliance, as: GoogleApi.Redis.V1beta1.Model.Compliance, type: :list) + field(:description) + field(:eventTime, as: DateTime) + field(:externalUri) + field(:name) + field(:provider) + field(:resourceContainer) + field(:resourceName) + field(:signalClass) + field(:signalId) + field(:signalType) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.DatabaseResourceHealthSignalData do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.DatabaseResourceHealthSignalData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.DatabaseResourceHealthSignalData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_id.ex b/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_id.ex new file mode 100644 index 0000000000..802d945308 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_id.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.Redis.V1beta1.Model.DatabaseResourceId do + @moduledoc """ + DatabaseResourceId will serve as primary key for any resource ingestion event. + + ## Attributes + + * `provider` (*type:* `String.t`, *default:* `nil`) - Required. Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged + * `providerDescription` (*type:* `String.t`, *default:* `nil`) - Optional. Needs to be used only when the provider is PROVIDER_OTHER. + * `resourceType` (*type:* `String.t`, *default:* `nil`) - Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel + * `uniqueId` (*type:* `String.t`, *default:* `nil`) - Required. A service-local token that distinguishes this resource from other resources within the same service. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :provider => String.t() | nil, + :providerDescription => String.t() | nil, + :resourceType => String.t() | nil, + :uniqueId => String.t() | nil + } + + field(:provider) + field(:providerDescription) + field(:resourceType) + field(:uniqueId) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.DatabaseResourceId do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.DatabaseResourceId.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.DatabaseResourceId do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_metadata.ex b/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_metadata.ex new file mode 100644 index 0000000000..6530eb9c6a --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_metadata.ex @@ -0,0 +1,95 @@ +# 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.Redis.V1beta1.Model.DatabaseResourceMetadata do + @moduledoc """ + Common model for database resource instance metadata. + + ## Attributes + + * `availabilityConfiguration` (*type:* `GoogleApi.Redis.V1beta1.Model.AvailabilityConfiguration.t`, *default:* `nil`) - Availability configuration for this instance + * `backupConfiguration` (*type:* `GoogleApi.Redis.V1beta1.Model.BackupConfiguration.t`, *default:* `nil`) - Backup configuration for this instance + * `backupRun` (*type:* `GoogleApi.Redis.V1beta1.Model.BackupRun.t`, *default:* `nil`) - Latest backup run information for this instance + * `creationTime` (*type:* `DateTime.t`, *default:* `nil`) - The creation time of the resource, i.e. the time when resource is created and recorded in partner service. + * `currentState` (*type:* `String.t`, *default:* `nil`) - Current state of the instance. + * `customMetadata` (*type:* `GoogleApi.Redis.V1beta1.Model.CustomMetadataData.t`, *default:* `nil`) - Any custom metadata associated with the resource + * `entitlements` (*type:* `list(GoogleApi.Redis.V1beta1.Model.Entitlement.t)`, *default:* `nil`) - Entitlements associated with the resource + * `expectedState` (*type:* `String.t`, *default:* `nil`) - The state that the instance is expected to be in. For example, an instance state can transition to UNHEALTHY due to wrong patch update, while the expected state will remain at the HEALTHY. + * `id` (*type:* `GoogleApi.Redis.V1beta1.Model.DatabaseResourceId.t`, *default:* `nil`) - Required. Unique identifier for a Database resource + * `instanceType` (*type:* `String.t`, *default:* `nil`) - The type of the instance. Specified at creation time. + * `location` (*type:* `String.t`, *default:* `nil`) - The resource location. REQUIRED + * `primaryResourceId` (*type:* `GoogleApi.Redis.V1beta1.Model.DatabaseResourceId.t`, *default:* `nil`) - Identifier for this resource's immediate parent/primary resource if the current resource is a replica or derived form of another Database resource. Else it would be NULL. REQUIRED if the immediate parent exists when first time resource is getting ingested, otherwise optional. + * `product` (*type:* `GoogleApi.Redis.V1beta1.Model.Product.t`, *default:* `nil`) - The product this resource represents. + * `resourceContainer` (*type:* `String.t`, *default:* `nil`) - Closest parent Cloud Resource Manager container of this resource. It must be resource name of a Cloud Resource Manager project with the format of "/", such as "projects/123". For GCP provided resources, number should be project number. + * `resourceName` (*type:* `String.t`, *default:* `nil`) - Required. Different from DatabaseResourceId.unique_id, a resource name can be reused over time. That is, after a resource named "ABC" is deleted, the name "ABC" can be used to to create a new resource within the same source. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel + * `updationTime` (*type:* `DateTime.t`, *default:* `nil`) - The time at which the resource was updated and recorded at partner service. + * `userLabels` (*type:* `map()`, *default:* `nil`) - User-provided labels, represented as a dictionary where each label is a single key value pair. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :availabilityConfiguration => + GoogleApi.Redis.V1beta1.Model.AvailabilityConfiguration.t() | nil, + :backupConfiguration => GoogleApi.Redis.V1beta1.Model.BackupConfiguration.t() | nil, + :backupRun => GoogleApi.Redis.V1beta1.Model.BackupRun.t() | nil, + :creationTime => DateTime.t() | nil, + :currentState => String.t() | nil, + :customMetadata => GoogleApi.Redis.V1beta1.Model.CustomMetadataData.t() | nil, + :entitlements => list(GoogleApi.Redis.V1beta1.Model.Entitlement.t()) | nil, + :expectedState => String.t() | nil, + :id => GoogleApi.Redis.V1beta1.Model.DatabaseResourceId.t() | nil, + :instanceType => String.t() | nil, + :location => String.t() | nil, + :primaryResourceId => GoogleApi.Redis.V1beta1.Model.DatabaseResourceId.t() | nil, + :product => GoogleApi.Redis.V1beta1.Model.Product.t() | nil, + :resourceContainer => String.t() | nil, + :resourceName => String.t() | nil, + :updationTime => DateTime.t() | nil, + :userLabels => map() | nil + } + + field(:availabilityConfiguration, as: GoogleApi.Redis.V1beta1.Model.AvailabilityConfiguration) + field(:backupConfiguration, as: GoogleApi.Redis.V1beta1.Model.BackupConfiguration) + field(:backupRun, as: GoogleApi.Redis.V1beta1.Model.BackupRun) + field(:creationTime, as: DateTime) + field(:currentState) + field(:customMetadata, as: GoogleApi.Redis.V1beta1.Model.CustomMetadataData) + field(:entitlements, as: GoogleApi.Redis.V1beta1.Model.Entitlement, type: :list) + field(:expectedState) + field(:id, as: GoogleApi.Redis.V1beta1.Model.DatabaseResourceId) + field(:instanceType) + field(:location) + field(:primaryResourceId, as: GoogleApi.Redis.V1beta1.Model.DatabaseResourceId) + field(:product, as: GoogleApi.Redis.V1beta1.Model.Product) + field(:resourceContainer) + field(:resourceName) + field(:updationTime, as: DateTime) + field(:userLabels, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.DatabaseResourceMetadata do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.DatabaseResourceMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.DatabaseResourceMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_recommendation_signal_data.ex b/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_recommendation_signal_data.ex new file mode 100644 index 0000000000..c3cf7a1402 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/database_resource_recommendation_signal_data.ex @@ -0,0 +1,69 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Redis.V1beta1.Model.DatabaseResourceRecommendationSignalData do + @moduledoc """ + Common model for database resource recommendation signal data. + + ## Attributes + + * `additionalMetadata` (*type:* `map()`, *default:* `nil`) - Optional. Any other additional metadata specific to recommendation + * `lastRefreshTime` (*type:* `DateTime.t`, *default:* `nil`) - Required. last time recommendationw as refreshed + * `recommendationState` (*type:* `String.t`, *default:* `nil`) - Required. Recommendation state + * `recommender` (*type:* `String.t`, *default:* `nil`) - Required. Name of recommendation. Examples: organizations/1234/locations/us-central1/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations/9876 + * `recommenderId` (*type:* `String.t`, *default:* `nil`) - Required. ID of recommender. Examples: "google.cloudsql.instance.PerformanceRecommender" + * `recommenderSubtype` (*type:* `String.t`, *default:* `nil`) - Required. Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = "google.cloudsql.instance.PerformanceRecommender", recommender_subtype can be "MYSQL_HIGH_NUMBER_OF_OPEN_TABLES_BEST_PRACTICE"/"POSTGRES_HIGH_TRANSACTION_ID_UTILIZATION_BEST_PRACTICE" + * `resourceName` (*type:* `String.t`, *default:* `nil`) - Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel + * `signalType` (*type:* `String.t`, *default:* `nil`) - Required. Type of signal, for example, `SIGNAL_TYPE_IDLE`, `SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES`, etc. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :additionalMetadata => map() | nil, + :lastRefreshTime => DateTime.t() | nil, + :recommendationState => String.t() | nil, + :recommender => String.t() | nil, + :recommenderId => String.t() | nil, + :recommenderSubtype => String.t() | nil, + :resourceName => String.t() | nil, + :signalType => String.t() | nil + } + + field(:additionalMetadata, type: :map) + field(:lastRefreshTime, as: DateTime) + field(:recommendationState) + field(:recommender) + field(:recommenderId) + field(:recommenderSubtype) + field(:resourceName) + field(:signalType) +end + +defimpl Poison.Decoder, + for: GoogleApi.Redis.V1beta1.Model.DatabaseResourceRecommendationSignalData do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.DatabaseResourceRecommendationSignalData.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Redis.V1beta1.Model.DatabaseResourceRecommendationSignalData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/discovery_endpoint.ex b/clients/redis/lib/google_api/redis/v1beta1/model/discovery_endpoint.ex new file mode 100644 index 0000000000..31b9a55178 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/discovery_endpoint.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.Redis.V1beta1.Model.DiscoveryEndpoint do + @moduledoc """ + Endpoints on each network, for Redis clients to connect to the cluster. + + ## Attributes + + * `address` (*type:* `String.t`, *default:* `nil`) - Output only. Address of the exposed Redis endpoint used by clients to connect to the service. The address could be either IP or hostname. + * `port` (*type:* `integer()`, *default:* `nil`) - Output only. The port number of the exposed Redis endpoint. + * `pscConfig` (*type:* `GoogleApi.Redis.V1beta1.Model.PscConfig.t`, *default:* `nil`) - Output only. Customer configuration for where the endpoint is created and accessed from. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :address => String.t() | nil, + :port => integer() | nil, + :pscConfig => GoogleApi.Redis.V1beta1.Model.PscConfig.t() | nil + } + + field(:address) + field(:port) + field(:pscConfig, as: GoogleApi.Redis.V1beta1.Model.PscConfig) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.DiscoveryEndpoint do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.DiscoveryEndpoint.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.DiscoveryEndpoint do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/entitlement.ex b/clients/redis/lib/google_api/redis/v1beta1/model/entitlement.ex new file mode 100644 index 0000000000..dd45bcf747 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/entitlement.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.Redis.V1beta1.Model.Entitlement do + @moduledoc """ + Proto representing the access that a user has to a specific feature/service. NextId: 3. + + ## Attributes + + * `entitlementState` (*type:* `String.t`, *default:* `nil`) - The current state of user's accessibility to a feature/benefit. + * `type` (*type:* `String.t`, *default:* `nil`) - An enum that represents the type of this entitlement. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :entitlementState => String.t() | nil, + :type => String.t() | nil + } + + field(:entitlementState) + field(:type) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.Entitlement do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.Entitlement.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.Entitlement do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/instance.ex b/clients/redis/lib/google_api/redis/v1beta1/model/instance.ex index af14c24d45..6c9cc204c9 100644 --- a/clients/redis/lib/google_api/redis/v1beta1/model/instance.ex +++ b/clients/redis/lib/google_api/redis/v1beta1/model/instance.ex @@ -30,6 +30,7 @@ defmodule GoogleApi.Redis.V1beta1.Model.Instance do * `displayName` (*type:* `String.t`, *default:* `nil`) - An arbitrary and optional user-provided name for the instance. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the instance was created. * `authorizedNetwork` (*type:* `String.t`, *default:* `nil`) - Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used. + * `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Optional. Output only. Reserved for future use. * `maintenanceSchedule` (*type:* `GoogleApi.Redis.V1beta1.Model.MaintenanceSchedule.t`, *default:* `nil`) - Output only. Date and time of upcoming maintenance events which have been scheduled. * `suspensionReasons` (*type:* `list(String.t)`, *default:* `nil`) - Optional. reasons that causes instance in "SUSPENDED" state. * `alternativeLocationId` (*type:* `String.t`, *default:* `nil`) - Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service. @@ -51,10 +52,11 @@ defmodule GoogleApi.Redis.V1beta1.Model.Instance do * `persistenceIamIdentity` (*type:* `String.t`, *default:* `nil`) - Output only. Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is "serviceAccount:". The value may change over time for a given instance so should be checked before each import/export operation. * `authEnabled` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. * `labels` (*type:* `map()`, *default:* `nil`) - Resource labels to represent user provided metadata + * `satisfiesPzi` (*type:* `boolean()`, *default:* `nil`) - Optional. Output only. Reserved for future use. * `tier` (*type:* `String.t`, *default:* `nil`) - Required. The service tier of the instance. * `readEndpoint` (*type:* `String.t`, *default:* `nil`) - Output only. Hostname or IP address of the exposed readonly Redis endpoint. Standard tier only. Targets all healthy replica nodes in instance. Replication is asynchronous and replica nodes will exhibit some lag behind the primary. Write requests must target 'host'. * `readEndpointPort` (*type:* `integer()`, *default:* `nil`) - Output only. The port number of the exposed readonly redis endpoint. Standard tier only. Write requests should target 'port'. - * `redisVersion` (*type:* `String.t`, *default:* `nil`) - Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility + * `redisVersion` (*type:* `String.t`, *default:* `nil`) - Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility * `REDIS_7_0` for Redis 7.0 compatibility * `maintenancePolicy` (*type:* `GoogleApi.Redis.V1beta1.Model.MaintenancePolicy.t`, *default:* `nil`) - Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time. """ @@ -70,6 +72,7 @@ defmodule GoogleApi.Redis.V1beta1.Model.Instance do :displayName => String.t() | nil, :createTime => DateTime.t() | nil, :authorizedNetwork => String.t() | nil, + :satisfiesPzs => boolean() | nil, :maintenanceSchedule => GoogleApi.Redis.V1beta1.Model.MaintenanceSchedule.t() | nil, :suspensionReasons => list(String.t()) | nil, :alternativeLocationId => String.t() | nil, @@ -91,6 +94,7 @@ defmodule GoogleApi.Redis.V1beta1.Model.Instance do :persistenceIamIdentity => String.t() | nil, :authEnabled => boolean() | nil, :labels => map() | nil, + :satisfiesPzi => boolean() | nil, :tier => String.t() | nil, :readEndpoint => String.t() | nil, :readEndpointPort => integer() | nil, @@ -107,6 +111,7 @@ defmodule GoogleApi.Redis.V1beta1.Model.Instance do field(:displayName) field(:createTime, as: DateTime) field(:authorizedNetwork) + field(:satisfiesPzs) field(:maintenanceSchedule, as: GoogleApi.Redis.V1beta1.Model.MaintenanceSchedule) field(:suspensionReasons, type: :list) field(:alternativeLocationId) @@ -128,6 +133,7 @@ defmodule GoogleApi.Redis.V1beta1.Model.Instance do field(:persistenceIamIdentity) field(:authEnabled) field(:labels, type: :map) + field(:satisfiesPzi) field(:tier) field(:readEndpoint) field(:readEndpointPort) diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/list_clusters_response.ex b/clients/redis/lib/google_api/redis/v1beta1/model/list_clusters_response.ex new file mode 100644 index 0000000000..7b0f0f33d8 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/list_clusters_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.Redis.V1beta1.Model.ListClustersResponse do + @moduledoc """ + Response for ListClusters. + + ## Attributes + + * `clusters` (*type:* `list(GoogleApi.Redis.V1beta1.Model.Cluster.t)`, *default:* `nil`) - A list of Redis clusters in the project in the specified location, or across all locations. If the `location_id` in the parent field of the request is "-", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder Redis entry is included in the response with the `name` field set to a value of the form `projects/{project_id}/locations/{location_id}/clusters/`- and the `status` field set to ERROR and `status_message` field set to "location not available for ListClusters". + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Token to retrieve the next page of results, or empty if there are no more results in the list. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :clusters => list(GoogleApi.Redis.V1beta1.Model.Cluster.t()) | nil, + :nextPageToken => String.t() | nil, + :unreachable => list(String.t()) | nil + } + + field(:clusters, as: GoogleApi.Redis.V1beta1.Model.Cluster, type: :list) + field(:nextPageToken) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.ListClustersResponse do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.ListClustersResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.ListClustersResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/location.ex b/clients/redis/lib/google_api/redis/v1beta1/model/location.ex index 7903b07db3..6678df8615 100644 --- a/clients/redis/lib/google_api/redis/v1beta1/model/location.ex +++ b/clients/redis/lib/google_api/redis/v1beta1/model/location.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.Redis.V1beta1.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/redis/lib/google_api/redis/v1beta1/model/managed_certificate_authority.ex b/clients/redis/lib/google_api/redis/v1beta1/model/managed_certificate_authority.ex new file mode 100644 index 0000000000..184085f94c --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/managed_certificate_authority.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.Redis.V1beta1.Model.ManagedCertificateAuthority do + @moduledoc """ + + + ## Attributes + + * `caCerts` (*type:* `list(GoogleApi.Redis.V1beta1.Model.CertChain.t)`, *default:* `nil`) - The PEM encoded CA certificate chains for redis managed server authentication + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :caCerts => list(GoogleApi.Redis.V1beta1.Model.CertChain.t()) | nil + } + + field(:caCerts, as: GoogleApi.Redis.V1beta1.Model.CertChain, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.ManagedCertificateAuthority do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.ManagedCertificateAuthority.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.ManagedCertificateAuthority do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/operation.ex b/clients/redis/lib/google_api/redis/v1beta1/model/operation.ex index 599f90290e..a744dc4aa1 100644 --- a/clients/redis/lib/google_api/redis/v1beta1/model/operation.ex +++ b/clients/redis/lib/google_api/redis/v1beta1/model/operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.Redis.V1beta1.Model.Operation do * `error` (*type:* `GoogleApi.Redis.V1beta1.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. * `metadata` (*type:* `map()`, *default:* `nil`) - { `createTime`: The time the operation was created. `endTime`: The time the operation finished running. `target`: Server-defined resource path for the target of the operation. `verb`: Name of the verb executed by the operation. `statusDetail`: Human-readable status of the operation, if any. `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. `apiVersion`: API version used to start the operation. } * `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/redis/lib/google_api/redis/v1beta1/model/operation_error.ex b/clients/redis/lib/google_api/redis/v1beta1/model/operation_error.ex new file mode 100644 index 0000000000..58251b5c36 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/operation_error.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.Redis.V1beta1.Model.OperationError do + @moduledoc """ + An error that occurred during a backup creation operation. + + ## Attributes + + * `code` (*type:* `String.t`, *default:* `nil`) - Identifies the specific error that occurred. REQUIRED + * `errorType` (*type:* `String.t`, *default:* `nil`) - + * `message` (*type:* `String.t`, *default:* `nil`) - Additional information about the error encountered. REQUIRED + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :code => String.t() | nil, + :errorType => String.t() | nil, + :message => String.t() | nil + } + + field(:code) + field(:errorType) + field(:message) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.OperationError do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.OperationError.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.OperationError do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/operation_metadata.ex b/clients/redis/lib/google_api/redis/v1beta1/model/operation_metadata.ex new file mode 100644 index 0000000000..c43200f739 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/operation_metadata.ex @@ -0,0 +1,64 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Redis.V1beta1.Model.OperationMetadata do + @moduledoc """ + Pre-defined metadata fields. + + ## Attributes + + * `apiVersion` (*type:* `String.t`, *default:* `nil`) - Output only. API version used to start the operation. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation was created. + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation finished running. + * `requestedCancellation` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * `statusMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Human-readable status of the operation, if any. + * `target` (*type:* `String.t`, *default:* `nil`) - Output only. Server-defined resource path for the target of the operation. + * `verb` (*type:* `String.t`, *default:* `nil`) - Output only. Name of the verb executed by the operation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :apiVersion => String.t() | nil, + :createTime => DateTime.t() | nil, + :endTime => DateTime.t() | nil, + :requestedCancellation => boolean() | nil, + :statusMessage => String.t() | nil, + :target => String.t() | nil, + :verb => String.t() | nil + } + + field(:apiVersion) + field(:createTime, as: DateTime) + field(:endTime, as: DateTime) + field(:requestedCancellation) + field(:statusMessage) + field(:target) + field(:verb) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.OperationMetadata do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.OperationMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.OperationMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/product.ex b/clients/redis/lib/google_api/redis/v1beta1/model/product.ex new file mode 100644 index 0000000000..b1a6f7ea19 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/product.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Redis.V1beta1.Model.Product do + @moduledoc """ + Product specification for Condor resources. + + ## Attributes + + * `engine` (*type:* `String.t`, *default:* `nil`) - The specific engine that the underlying database is running. + * `type` (*type:* `String.t`, *default:* `nil`) - Type of specific database product. It could be CloudSQL, AlloyDB etc.. + * `version` (*type:* `String.t`, *default:* `nil`) - Version of the underlying database engine. Example values: For MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" etc.. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :engine => String.t() | nil, + :type => String.t() | nil, + :version => String.t() | nil + } + + field(:engine) + field(:type) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.Product do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.Product.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.Product do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/psc_config.ex b/clients/redis/lib/google_api/redis/v1beta1/model/psc_config.ex new file mode 100644 index 0000000000..7b8270572d --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/psc_config.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.Redis.V1beta1.Model.PscConfig do + @moduledoc """ + + + ## Attributes + + * `network` (*type:* `String.t`, *default:* `nil`) - Required. The network where the IP address of the discovery endpoint will be reserved, in the form of projects/{network_project}/global/networks/{network_id}. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :network => String.t() | nil + } + + field(:network) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.PscConfig do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.PscConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.PscConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/psc_connection.ex b/clients/redis/lib/google_api/redis/v1beta1/model/psc_connection.ex new file mode 100644 index 0000000000..b776ff607f --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/psc_connection.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.Redis.V1beta1.Model.PscConnection do + @moduledoc """ + Details of consumer resources in a PSC connection. + + ## Attributes + + * `address` (*type:* `String.t`, *default:* `nil`) - Output only. The IP allocated on the consumer network for the PSC forwarding rule. + * `forwardingRule` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + * `network` (*type:* `String.t`, *default:* `nil`) - The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}. + * `projectId` (*type:* `String.t`, *default:* `nil`) - Output only. The consumer project_id where the forwarding rule is created from. + * `pscConnectionId` (*type:* `String.t`, *default:* `nil`) - Output only. The PSC connection id of the forwarding rule connected to the service attachment. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :address => String.t() | nil, + :forwardingRule => String.t() | nil, + :network => String.t() | nil, + :projectId => String.t() | nil, + :pscConnectionId => String.t() | nil + } + + field(:address) + field(:forwardingRule) + field(:network) + field(:projectId) + field(:pscConnectionId) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.PscConnection do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.PscConnection.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.PscConnection do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/retention_settings.ex b/clients/redis/lib/google_api/redis/v1beta1/model/retention_settings.ex new file mode 100644 index 0000000000..6fafb9b4dc --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/retention_settings.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.Redis.V1beta1.Model.RetentionSettings do + @moduledoc """ + + + ## Attributes + + * `quantityBasedRetention` (*type:* `integer()`, *default:* `nil`) - + * `retentionUnit` (*type:* `String.t`, *default:* `nil`) - The unit that 'retained_backups' represents. + * `timeBasedRetention` (*type:* `String.t`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :quantityBasedRetention => integer() | nil, + :retentionUnit => String.t() | nil, + :timeBasedRetention => String.t() | nil + } + + field(:quantityBasedRetention) + field(:retentionUnit) + field(:timeBasedRetention) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.RetentionSettings do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.RetentionSettings.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.RetentionSettings do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/state_info.ex b/clients/redis/lib/google_api/redis/v1beta1/model/state_info.ex new file mode 100644 index 0000000000..3eb1090b72 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/state_info.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.Redis.V1beta1.Model.StateInfo do + @moduledoc """ + Represents additional information about the state of the cluster. + + ## Attributes + + * `updateInfo` (*type:* `GoogleApi.Redis.V1beta1.Model.UpdateInfo.t`, *default:* `nil`) - Describes ongoing update on the cluster when cluster state is UPDATING. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :updateInfo => GoogleApi.Redis.V1beta1.Model.UpdateInfo.t() | nil + } + + field(:updateInfo, as: GoogleApi.Redis.V1beta1.Model.UpdateInfo) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.StateInfo do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.StateInfo.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.StateInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/redis/lib/google_api/redis/v1beta1/model/update_info.ex b/clients/redis/lib/google_api/redis/v1beta1/model/update_info.ex new file mode 100644 index 0000000000..2978d59883 --- /dev/null +++ b/clients/redis/lib/google_api/redis/v1beta1/model/update_info.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.Redis.V1beta1.Model.UpdateInfo do + @moduledoc """ + Represents information about an updating cluster. + + ## Attributes + + * `targetReplicaCount` (*type:* `integer()`, *default:* `nil`) - Target number of replica nodes per shard. + * `targetShardCount` (*type:* `integer()`, *default:* `nil`) - Target number of shards for redis cluster + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :targetReplicaCount => integer() | nil, + :targetShardCount => integer() | nil + } + + field(:targetReplicaCount) + field(:targetShardCount) +end + +defimpl Poison.Decoder, for: GoogleApi.Redis.V1beta1.Model.UpdateInfo do + def decode(value, options) do + GoogleApi.Redis.V1beta1.Model.UpdateInfo.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Redis.V1beta1.Model.UpdateInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end