From c5db5f5c06bea1a18d9c10a285a167c86142c38f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 01:31:48 +0000 Subject: [PATCH] feat: Automated regeneration of NetworkConnectivity client --- .../network_connectivity/v1/api/projects.ex | 3159 +++++++++++++++-- .../network_connectivity/v1/metadata.ex | 2 +- .../v1/model/accept_hub_spoke_request.ex | 49 + .../v1/model/accept_hub_spoke_response.ex | 46 + .../network_connectivity/v1/model/binding.ex | 4 +- .../v1/model/consumer_psc_config.ex | 55 + .../v1/model/consumer_psc_connection.ex | 79 + .../network_connectivity/v1/model/filter.ex | 55 + .../v1/model/google_longrunning_operation.ex | 2 +- .../v1/model/google_rpc_error_info.ex | 52 + .../network_connectivity/v1/model/group.ex | 64 + .../network_connectivity/v1/model/hub.ex | 10 +- .../v1/model/interconnect_attachment.ex | 46 + .../v1/model/internal_range.ex | 20 +- .../v1/model/linked_vpc_network.ex | 49 + .../v1/model/list_groups_response.ex | 52 + .../v1/model/list_hub_spokes_response.ex | 52 + .../v1/model/list_hubs_response.ex | 2 +- .../v1/model/list_internal_ranges_response.ex | 2 +- .../list_policy_based_routes_response.ex | 58 + .../v1/model/list_route_tables_response.ex | 52 + .../v1/model/list_routes_response.ex | 52 + .../v1/model/list_service_classes_response.ex | 52 + .../list_service_connection_maps_response.ex | 63 + ...st_service_connection_policies_response.ex | 63 + ...list_service_connection_tokens_response.ex | 63 + .../v1/model/list_spokes_response.ex | 2 +- .../network_connectivity/v1/model/location.ex | 2 +- .../v1/model/next_hop_vpc_network.ex | 46 + .../network_connectivity/v1/model/policy.ex | 2 +- .../v1/model/policy_based_route.ex | 91 + .../v1/model/producer_psc_config.ex | 46 + .../v1/model/psc_config.ex | 49 + .../v1/model/psc_connection.ex | 73 + .../v1/model/reject_hub_spoke_request.ex | 52 + .../v1/model/reject_hub_spoke_response.ex | 46 + .../network_connectivity/v1/model/route.ex | 80 + .../v1/model/route_table.ex | 64 + .../v1/model/service_class.ex | 64 + .../v1/model/service_connection_map.ex | 98 + .../v1/model/service_connection_policy.ex | 76 + .../v1/model/service_connection_token.ex | 70 + .../network_connectivity/v1/model/spoke.ex | 18 +- .../v1/model/spoke_state_count.ex | 49 + .../v1/model/spoke_state_reason_count.ex | 49 + .../v1/model/spoke_summary.ex | 60 + .../v1/model/spoke_type_count.ex | 49 + .../v1/model/state_reason.ex | 52 + .../v1/model/virtual_machine.ex | 46 + .../network_connectivity/v1/model/warnings.ex | 52 + 50 files changed, 5128 insertions(+), 311 deletions(-) create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/accept_hub_spoke_request.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/accept_hub_spoke_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/consumer_psc_config.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/consumer_psc_connection.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/filter.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/google_rpc_error_info.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/group.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/interconnect_attachment.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_vpc_network.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_groups_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_hub_spokes_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_policy_based_routes_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_route_tables_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_routes_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_classes_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_maps_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_policies_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_tokens_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/next_hop_vpc_network.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/policy_based_route.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/producer_psc_config.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_config.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_connection.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/reject_hub_spoke_request.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/reject_hub_spoke_response.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/route.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/route_table.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_class.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_map.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_policy.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_token.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_state_count.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_state_reason_count.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_summary.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_type_count.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/state_reason.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/virtual_machine.ex create mode 100644 clients/network_connectivity/lib/google_api/network_connectivity/v1/model/warnings.ex diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/api/projects.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/api/projects.ex index 60cc7ac23a..a7203f1ccf 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/api/projects.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/api/projects.ex @@ -173,6 +173,80 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do ) end + @doc """ + Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the hub into which to accept the spoke. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.AcceptHubSpokeRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_hubs_accept_spoke( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_hubs_accept_spoke( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+name}:acceptSpoke", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + @doc """ Creates a new Network Connectivity Center hub in the specified project. @@ -193,7 +267,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `: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"). * `:hubId` (*type:* `String.t`) - Required. A unique identifier for the hub. - * `:requestId` (*type:* `String.t`) - Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:requestId` (*type:* `String.t`) - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.Hub.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -270,7 +344,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:requestId` (*type:* `String.t`) - Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:requestId` (*type:* `String.t`) - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -486,9 +560,9 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:filter` (*type:* `String.t`) - An expression that filters the results listed in the response. + * `:filter` (*type:* `String.t`) - An expression that filters the list of results. * `:orderBy` (*type:* `String.t`) - Sort the results by a certain order. - * `:pageSize` (*type:* `integer()`) - The maximum number of results per page that should be returned. + * `:pageSize` (*type:* `integer()`) - The maximum number of results per page to return. * `:pageToken` (*type:* `String.t`) - The page token. * `opts` (*type:* `keyword()`) - Call options @@ -548,12 +622,12 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do end @doc """ - Updates the description and/or labels of a Network Connectivity Center hub. + Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Immutable. The name of the hub. Hub names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub_id}` + * `name` (*type:* `String.t`) - Required. The name of the hub. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -566,27 +640,30 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:requestId` (*type:* `String.t`) - Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * `:updateMask` (*type:* `String.t`) - Optional. In the case of an update to an existing hub, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten. - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.Hub.t`) - + * `:filter` (*type:* `String.t`) - An expression that filters the list of results. + * `:orderBy` (*type:* `String.t`) - Sort the results by name or create_time. + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return per page. + * `:pageToken` (*type:* `String.t`) - The page token. + * `:spokeLocations` (*type:* `list(String.t)`) - A list of locations. Specify one of the following: `[global]`, a single region (for example, `[us-central1]`), or a combination of values (for example, `[global, us-central1, us-west1]`). If the spoke_locations field is populated, the list of results includes only spokes in the specified location. If the spoke_locations field is not populated, the list of results includes spokes in all locations. + * `:view` (*type:* `String.t`) - The view of the spoke to return. The view that you use determines which spoke fields are included in the response. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListHubSpokesResponse{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_global_hubs_patch( + @spec networkconnectivity_projects_locations_global_hubs_list_spokes( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListHubSpokesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_global_hubs_patch( + def networkconnectivity_projects_locations_global_hubs_list_spokes( connection, name, optional_params \\ [], @@ -604,15 +681,18 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :requestId => :query, - :updateMask => :query, - :body => :body + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query, + :spokeLocations => :query, + :view => :query } request = Request.new() - |> Request.method(:patch) - |> Request.url("/v1/{+name}", %{ + |> Request.method(:get) + |> Request.url("/v1/{+name}:listSpokes", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -621,17 +701,17 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.ListHubSpokesResponse{}] ) end @doc """ - Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + Updates the description and/or labels of a Network Connectivity Center hub. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `name` (*type:* `String.t`) - Immutable. The name of the hub. Hub names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub_id}` * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -644,27 +724,29 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - + * `:requestId` (*type:* `String.t`) - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:updateMask` (*type:* `String.t`) - Optional. In the case of an update to an existing hub, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten. + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.Hub.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_global_hubs_set_iam_policy( + @spec networkconnectivity_projects_locations_global_hubs_patch( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_global_hubs_set_iam_policy( + def networkconnectivity_projects_locations_global_hubs_patch( connection, - resource, + name, optional_params \\ [], opts \\ [] ) do @@ -680,30 +762,34 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :requestId => :query, + :updateMask => :query, :body => :body } request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/{+resource}:setIamPolicy", %{ - "resource" => URI.encode(resource, &URI.char_unreserved?/1) + |> Request.method(:patch) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.Policy{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) end @doc """ - Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able to connect to other spokes that are attached to the hub. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `name` (*type:* `String.t`) - Required. The name of the hub from which to reject the spoke. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -716,27 +802,27 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.RejectHubSpokeRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_global_hubs_test_iam_permissions( + @spec networkconnectivity_projects_locations_global_hubs_reject_spoke( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_global_hubs_test_iam_permissions( + def networkconnectivity_projects_locations_global_hubs_reject_spoke( connection, - resource, + name, optional_params \\ [], opts \\ [] ) do @@ -758,8 +844,8 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do request = Request.new() |> Request.method(:post) - |> Request.url("/v1/{+resource}:testIamPermissions", %{ - "resource" => URI.encode(resource, &URI.char_unreserved?/1) + |> Request.url("/v1/{+name}:rejectSpoke", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) @@ -767,17 +853,17 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] ) end @doc """ - Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -790,7 +876,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:"options.requestedPolicyVersion"` (*type:* `integer()`) - Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -798,7 +884,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_global_policy_based_routes_get_iam_policy( + @spec networkconnectivity_projects_locations_global_hubs_set_iam_policy( Tesla.Env.client(), String.t(), keyword(), @@ -808,7 +894,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_global_policy_based_routes_get_iam_policy( + def networkconnectivity_projects_locations_global_hubs_set_iam_policy( connection, resource, optional_params \\ [], @@ -826,13 +912,13 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :"options.requestedPolicyVersion" => :query + :body => :body } request = Request.new() - |> Request.method(:get) - |> Request.url("/v1/{+resource}:getIamPolicy", %{ + |> Request.method(:post) + |> Request.url("/v1/{+resource}:setIamPolicy", %{ "resource" => URI.encode(resource, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -844,12 +930,12 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do end @doc """ - Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -862,25 +948,25 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_global_policy_based_routes_set_iam_policy( + @spec networkconnectivity_projects_locations_global_hubs_test_iam_permissions( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_global_policy_based_routes_set_iam_policy( + def networkconnectivity_projects_locations_global_hubs_test_iam_permissions( connection, resource, optional_params \\ [], @@ -904,7 +990,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do request = Request.new() |> Request.method(:post) - |> Request.url("/v1/{+resource}:setIamPolicy", %{ + |> Request.url("/v1/{+resource}:testIamPermissions", %{ "resource" => URI.encode(resource, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -912,16 +998,18 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.Policy{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] + ) end @doc """ - Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + Gets details about a Network Connectivity Center group. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `name` (*type:* `String.t`) - Required. The name of the route table resource. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -934,27 +1022,26 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Group{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_global_policy_based_routes_test_iam_permissions( + @spec networkconnectivity_projects_locations_global_hubs_groups_get( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Group.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_global_policy_based_routes_test_iam_permissions( + def networkconnectivity_projects_locations_global_hubs_groups_get( connection, - resource, + name, optional_params \\ [], opts \\ [] ) do @@ -969,33 +1056,30 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :body => :body + :upload_protocol => :query } request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/{+resource}:testIamPermissions", %{ - "resource" => URI.encode(resource, &URI.char_unreserved?/1) + |> Request.method(:get) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode( - opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] - ) + |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.Group{}]) end @doc """ - Creates a new InternalRange in a given project and location. + Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `parent` (*type:* `String.t`) - Required. The parent resource's name of the InternalRange. + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1008,29 +1092,27 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:internalRangeId` (*type:* `String.t`) - Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. - * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.InternalRange.t`) - + * `:"options.requestedPolicyVersion"` (*type:* `integer()`) - Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_internal_ranges_create( + @spec networkconnectivity_projects_locations_global_hubs_groups_get_iam_policy( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_internal_ranges_create( + def networkconnectivity_projects_locations_global_hubs_groups_get_iam_policy( connection, - parent, + resource, optional_params \\ [], opts \\ [] ) do @@ -1046,34 +1128,30 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :internalRangeId => :query, - :requestId => :query, - :body => :body + :"options.requestedPolicyVersion" => :query } request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/{+parent}/internalRanges", %{ - "parent" => URI.encode(parent, &URI.char_unreserved?/1) + |> Request.method(:get) + |> Request.url("/v1/{+resource}:getIamPolicy", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] - ) + |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.Policy{}]) end @doc """ - Deletes a single InternalRange. + Lists groups in a given hub. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The name of the InternalRange to delete. + * `parent` (*type:* `String.t`) - Required. The parent resource's name. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1086,27 +1164,30 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:filter` (*type:* `String.t`) - An expression that filters the list of results. + * `:orderBy` (*type:* `String.t`) - Sort the results by a certain order. + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return per page. + * `:pageToken` (*type:* `String.t`) - The page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListGroupsResponse{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_internal_ranges_delete( + @spec networkconnectivity_projects_locations_global_hubs_groups_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListGroupsResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_internal_ranges_delete( + def networkconnectivity_projects_locations_global_hubs_groups_list( connection, - name, + parent, optional_params \\ [], opts \\ [] ) do @@ -1122,14 +1203,17 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :requestId => :query + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query } request = Request.new() - |> Request.method(:delete) - |> Request.url("/v1/{+name}", %{ - "name" => URI.encode(name, &URI.char_unreserved?/1) + |> Request.method(:get) + |> Request.url("/v1/{+parent}/groups", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) @@ -1137,17 +1221,17 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.ListGroupsResponse{}] ) end @doc """ - Gets details of a single InternalRange. + Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. Name of the InternalRange to get. + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1160,26 +1244,27 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.InternalRange{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_internal_ranges_get( + @spec networkconnectivity_projects_locations_global_hubs_groups_set_iam_policy( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.InternalRange.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_internal_ranges_get( + def networkconnectivity_projects_locations_global_hubs_groups_set_iam_policy( connection, - name, + resource, optional_params \\ [], opts \\ [] ) do @@ -1194,30 +1279,2424 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :body => :body } request = Request.new() - |> Request.method(:get) - |> Request.url("/v1/{+name}", %{ - "name" => URI.encode(name, &URI.char_unreserved?/1) - }) + |> Request.method(:post) + |> Request.url("/v1/{+resource}:setIamPolicy", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.Policy{}]) + end + + @doc """ + Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_hubs_groups_test_iam_permissions( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_hubs_groups_test_iam_permissions( + connection, + resource, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+resource}:testIamPermissions", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] + ) + end + + @doc """ + Gets details about a Network Connectivity Center route table. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the route table resource. + * `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.NetworkConnectivity.V1.Model.RouteTable{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_hubs_route_tables_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.RouteTable.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_hubs_route_tables_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.RouteTable{}]) + end + + @doc """ + Lists route tables in a given hub. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource's name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - An expression that filters the list of results. + * `:orderBy` (*type:* `String.t`) - Sort the results by a certain order. + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return per page. + * `:pageToken` (*type:* `String.t`) - The page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListRouteTablesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_hubs_route_tables_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListRouteTablesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_hubs_route_tables_list( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/routeTables", %{ + "parent" => URI.encode(parent, &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.NetworkConnectivity.V1.Model.ListRouteTablesResponse{}] + ) + end + + @doc """ + Gets details about the specified route. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the route resource. + * `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.NetworkConnectivity.V1.Model.Route{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_hubs_route_tables_routes_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Route.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_hubs_route_tables_routes_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.Route{}]) + end + + @doc """ + Lists routes in a given route table. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource's name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - An expression that filters the list of results. + * `:orderBy` (*type:* `String.t`) - Sort the results by a certain order. + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return per page. + * `:pageToken` (*type:* `String.t`) - The page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListRoutesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_hubs_route_tables_routes_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListRoutesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_hubs_route_tables_routes_list( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/routes", %{ + "parent" => URI.encode(parent, &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.NetworkConnectivity.V1.Model.ListRoutesResponse{}] + ) + end + + @doc """ + Creates a new policy-based route in a given project and location. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource's name of the PolicyBasedRoute. + * `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"). + * `:policyBasedRouteId` (*type:* `String.t`) - Required. Unique id for the policy-based route to create. + * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.PolicyBasedRoute.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_policy_based_routes_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_policy_based_routes_create( + connection, + parent, + 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, + :policyBasedRouteId => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+parent}/policyBasedRoutes", %{ + "parent" => URI.encode(parent, &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.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Deletes a single policy-based route. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Name of the policy-based route resource to delete. + * `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`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_policy_based_routes_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_policy_based_routes_delete( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :requestId => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets details of a single policy-based route. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Name of the PolicyBasedRoute resource to get. + * `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.NetworkConnectivity.V1.Model.PolicyBasedRoute{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_policy_based_routes_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.PolicyBasedRoute.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_policy_based_routes_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.PolicyBasedRoute{}] + ) + end + + @doc """ + Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `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"). + * `:"options.requestedPolicyVersion"` (*type:* `integer()`) - Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_policy_based_routes_get_iam_policy( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_policy_based_routes_get_iam_policy( + connection, + resource, + 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, + :"options.requestedPolicyVersion" => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+resource}:getIamPolicy", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.Policy{}]) + end + + @doc """ + Lists policy-based routes in a given project and location. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource's name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - A filter expression that filters the results listed in the response. + * `:orderBy` (*type:* `String.t`) - Sort the results by a certain order. + * `:pageSize` (*type:* `integer()`) - The maximum number of results per page that should be returned. + * `:pageToken` (*type:* `String.t`) - The page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListPolicyBasedRoutesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_policy_based_routes_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListPolicyBasedRoutesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_policy_based_routes_list( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/policyBasedRoutes", %{ + "parent" => URI.encode(parent, &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.NetworkConnectivity.V1.Model.ListPolicyBasedRoutesResponse{}] + ) + end + + @doc """ + Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_policy_based_routes_set_iam_policy( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_policy_based_routes_set_iam_policy( + connection, + resource, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+resource}:setIamPolicy", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.Policy{}]) + end + + @doc """ + Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_global_policy_based_routes_test_iam_permissions( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_global_policy_based_routes_test_iam_permissions( + connection, + resource, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+resource}:testIamPermissions", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] + ) + end + + @doc """ + Creates a new internal range in a given project and location. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource's name of the internal range. + * `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"). + * `:internalRangeId` (*type:* `String.t`) - Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. + * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.InternalRange.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_internal_ranges_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_internal_ranges_create( + connection, + parent, + 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, + :internalRangeId => :query, + :requestId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+parent}/internalRanges", %{ + "parent" => URI.encode(parent, &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.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Deletes a single internal range. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the internal range to delete. + * `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`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_internal_ranges_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_internal_ranges_delete( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :requestId => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets details of a single internal range. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Name of the InternalRange to get. + * `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.NetworkConnectivity.V1.Model.InternalRange{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_internal_ranges_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.InternalRange.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_internal_ranges_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.InternalRange{}]) + end + + @doc """ + Lists internal ranges in a given project and location. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource's name. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - A filter expression that filters the results listed in the response. + * `:orderBy` (*type:* `String.t`) - Sort the results by a certain order. + * `:pageSize` (*type:* `integer()`) - The maximum number of results per page that should be returned. + * `:pageToken` (*type:* `String.t`) - The page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListInternalRangesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_internal_ranges_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListInternalRangesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_internal_ranges_list( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/internalRanges", %{ + "parent" => URI.encode(parent, &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.NetworkConnectivity.V1.Model.ListInternalRangesResponse{}] + ) + end + + @doc """ + Updates the parameters of a single internal range. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. The name of an internal range. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names + * `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`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:updateMask` (*type:* `String.t`) - Optional. Field mask is used to specify the fields to be overwritten in the InternalRange resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.InternalRange.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_internal_ranges_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_internal_ranges_patch( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :requestId => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource to be cancelled. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningCancelOperationRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_operations_cancel( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_operations_cancel( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+name}:cancel", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.Empty{}]) + end + + @doc """ + Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource to be deleted. + * `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.NetworkConnectivity.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_operations_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_operations_delete( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.Empty{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_operations_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_operations_list( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}/operations", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningListOperationsResponse{} + ] + ) + end + + @doc """ + Deletes a single ServiceClass. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the ServiceClass to delete. + * `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"). + * `:etag` (*type:* `String.t`) - Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_classes_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_classes_delete( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :etag => :query, + :requestId => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Gets details of a single ServiceClass. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Name of the ServiceClass to get. + * `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.NetworkConnectivity.V1.Model.ServiceClass{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_classes_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ServiceClass.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_classes_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.ServiceClass{}]) + end + + @doc """ + Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `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"). + * `:"options.requestedPolicyVersion"` (*type:* `integer()`) - Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_classes_get_iam_policy( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_classes_get_iam_policy( + connection, + resource, + 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, + :"options.requestedPolicyVersion" => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+resource}:getIamPolicy", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.Policy{}]) + end + + @doc """ + Lists ServiceClasses in a given project and location. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource's name. ex. projects/123/locations/us-east1 + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - A filter expression that filters the results listed in the response. + * `:orderBy` (*type:* `String.t`) - Sort the results by a certain order. + * `:pageSize` (*type:* `integer()`) - The maximum number of results per page that should be returned. + * `:pageToken` (*type:* `String.t`) - The page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListServiceClassesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_classes_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListServiceClassesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_classes_list( + connection, + parent, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/serviceClasses", %{ + "parent" => URI.encode(parent, &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.NetworkConnectivity.V1.Model.ListServiceClassesResponse{}] + ) + end + + @doc """ + Updates the parameters of a single ServiceClass. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Immutable. The name of a ServiceClass resource. Format: projects/{project}/locations/{location}/serviceClasses/{service_class} See: https://google.aip.dev/122#fields-representing-resource-names + * `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`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:updateMask` (*type:* `String.t`) - Optional. Field mask is used to specify the fields to be overwritten in the ServiceClass resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.ServiceClass.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_classes_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_classes_patch( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :requestId => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_classes_set_iam_policy( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_classes_set_iam_policy( + connection, + resource, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+resource}:setIamPolicy", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.Policy{}]) + end + + @doc """ + Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_classes_test_iam_permissions( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_classes_test_iam_permissions( + connection, + resource, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+resource}:testIamPermissions", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] + ) + end + + @doc """ + Creates a new ServiceConnectionMap in a given project and location. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource's name of the ServiceConnectionMap. ex. projects/123/locations/us-east1 + * `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`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:serviceConnectionMapId` (*type:* `String.t`) - Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceConnectionMaps/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. If one is not provided, one will be generated. + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_connection_maps_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_connection_maps_create( + connection, + parent, + 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, + :serviceConnectionMapId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+parent}/serviceConnectionMaps", %{ + "parent" => URI.encode(parent, &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.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Deletes a single ServiceConnectionMap. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The name of the ServiceConnectionMap to delete. + * `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"). + * `:etag` (*type:* `String.t`) - Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_connection_maps_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_connection_maps_delete( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :etag => :query, + :requestId => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.InternalRange{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) end @doc """ - Lists InternalRanges in a given project and location. + Gets details of a single ServiceConnectionMap. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `parent` (*type:* `String.t`) - Required. The parent resource's name. + * `name` (*type:* `String.t`) - Required. Name of the ServiceConnectionMap to get. + * `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.NetworkConnectivity.V1.Model.ServiceConnectionMap{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_connection_maps_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_connection_maps_get( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap{}] + ) + end + + @doc """ + Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `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"). + * `:"options.requestedPolicyVersion"` (*type:* `integer()`) - Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_connection_maps_get_iam_policy( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_connection_maps_get_iam_policy( + connection, + resource, + 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, + :"options.requestedPolicyVersion" => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+resource}:getIamPolicy", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.Policy{}]) + end + + @doc """ + Lists ServiceConnectionMaps in a given project and location. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. The parent resource's name. ex. projects/123/locations/us-east1 * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1238,20 +3717,20 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListInternalRangesResponse{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionMapsResponse{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_internal_ranges_list( + @spec networkconnectivity_projects_locations_service_connection_maps_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListInternalRangesResponse.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionMapsResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_internal_ranges_list( + def networkconnectivity_projects_locations_service_connection_maps_list( connection, parent, optional_params \\ [], @@ -1278,7 +3757,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do request = Request.new() |> Request.method(:get) - |> Request.url("/v1/{+parent}/internalRanges", %{ + |> Request.url("/v1/{+parent}/serviceConnectionMaps", %{ "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1287,17 +3766,18 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.ListInternalRangesResponse{}] + opts ++ + [struct: %GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionMapsResponse{}] ) end @doc """ - Updates the parameters of a single InternalRange. + Updates the parameters of a single ServiceConnectionMap. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Immutable. The name of a InternalRange. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names + * `name` (*type:* `String.t`) - Immutable. The name of a ServiceConnectionMap. Format: projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map} See: https://google.aip.dev/122#fields-representing-resource-names * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1310,9 +3790,9 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * `:updateMask` (*type:* `String.t`) - Optional. Field mask is used to specify the fields to be overwritten in the InternalRange resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.InternalRange.t`) - + * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:updateMask` (*type:* `String.t`) - Optional. Field mask is used to specify the fields to be overwritten in the ServiceConnectionMap resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -1320,7 +3800,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_internal_ranges_patch( + @spec networkconnectivity_projects_locations_service_connection_maps_patch( Tesla.Env.client(), String.t(), keyword(), @@ -1330,7 +3810,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_internal_ranges_patch( + def networkconnectivity_projects_locations_service_connection_maps_patch( connection, name, optional_params \\ [], @@ -1364,18 +3844,90 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) - |> Response.decode( - opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] - ) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) + end + + @doc """ + Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec networkconnectivity_projects_locations_service_connection_maps_set_iam_policy( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def networkconnectivity_projects_locations_service_connection_maps_set_iam_policy( + connection, + resource, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+resource}:setIamPolicy", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.Policy{}]) end @doc """ - Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - The name of the operation resource to be cancelled. + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1388,27 +3940,27 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningCancelOperationRequest.t`) - + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Empty{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_operations_cancel( + @spec networkconnectivity_projects_locations_service_connection_maps_test_iam_permissions( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.Empty.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_operations_cancel( + def networkconnectivity_projects_locations_service_connection_maps_test_iam_permissions( connection, - name, + resource, optional_params \\ [], opts \\ [] ) do @@ -1430,24 +3982,26 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do request = Request.new() |> Request.method(:post) - |> Request.url("/v1/{+name}:cancel", %{ - "name" => URI.encode(name, &URI.char_unreserved?/1) + |> Request.url("/v1/{+resource}:testIamPermissions", %{ + "resource" => URI.encode(resource, &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.NetworkConnectivity.V1.Model.Empty{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] + ) end @doc """ - Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + Creates a new ServiceConnectionPolicy in a given project and location. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - The name of the operation resource to be deleted. + * `parent` (*type:* `String.t`) - Required. The parent resource's name of the ServiceConnectionPolicy. ex. projects/123/locations/us-east1 * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1460,26 +4014,29 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:serviceConnectionPolicyId` (*type:* `String.t`) - Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceConnectionPolicies/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Empty{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_operations_delete( + @spec networkconnectivity_projects_locations_service_connection_policies_create( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.Empty.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_operations_delete( + def networkconnectivity_projects_locations_service_connection_policies_create( connection, - name, + parent, optional_params \\ [], opts \\ [] ) do @@ -1494,30 +4051,35 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :requestId => :query, + :serviceConnectionPolicyId => :query, + :body => :body } request = Request.new() - |> Request.method(:delete) - |> Request.url("/v1/{+name}", %{ - "name" => URI.encode(name, &URI.char_unreserved?/1) + |> Request.method(:post) + |> Request.url("/v1/{+parent}/serviceConnectionPolicies", %{ + "parent" => URI.encode(parent, &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.NetworkConnectivity.V1.Model.Empty{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) end @doc """ - Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + Deletes a single ServiceConnectionPolicy. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - The name of the operation resource. + * `name` (*type:* `String.t`) - Required. The name of the ServiceConnectionPolicy to delete. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1530,6 +4092,8 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:etag` (*type:* `String.t`) - Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -1537,7 +4101,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_operations_get( + @spec networkconnectivity_projects_locations_service_connection_policies_delete( Tesla.Env.client(), String.t(), keyword(), @@ -1547,7 +4111,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_operations_get( + def networkconnectivity_projects_locations_service_connection_policies_delete( connection, name, optional_params \\ [], @@ -1564,12 +4128,14 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :etag => :query, + :requestId => :query } request = Request.new() - |> Request.method(:get) + |> Request.method(:delete) |> Request.url("/v1/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) @@ -1584,12 +4150,12 @@ defmodule GoogleApi.NetworkConnectivity.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. + Gets details of a single ServiceConnectionPolicy. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `name` (*type:* `String.t`) - Required. Name of the ServiceConnectionPolicy to get. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1602,28 +4168,24 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:filter` (*type:* `String.t`) - The standard list filter. - * `:pageSize` (*type:* `integer()`) - The standard list page size. - * `:pageToken` (*type:* `String.t`) - The standard list page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningListOperationsResponse{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_operations_list( + @spec networkconnectivity_projects_locations_service_connection_policies_get( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, - GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningListOperationsResponse.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_operations_list( + def networkconnectivity_projects_locations_service_connection_policies_get( connection, name, optional_params \\ [], @@ -1640,16 +4202,13 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :filter => :query, - :pageSize => :query, - :pageToken => :query + :upload_protocol => :query } request = Request.new() |> Request.method(:get) - |> Request.url("/v1/{+name}/operations", %{ + |> Request.url("/v1/{+name}", %{ "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1658,11 +4217,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) |> Response.decode( - opts ++ - [ - struct: - %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningListOperationsResponse{} - ] + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy{}] ) end @@ -1693,7 +4248,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_service_classes_get_iam_policy( + @spec networkconnectivity_projects_locations_service_connection_policies_get_iam_policy( Tesla.Env.client(), String.t(), keyword(), @@ -1703,7 +4258,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_service_classes_get_iam_policy( + def networkconnectivity_projects_locations_service_connection_policies_get_iam_policy( connection, resource, optional_params \\ [], @@ -1739,12 +4294,12 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do end @doc """ - Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + Lists ServiceConnectionPolicies in a given project and location. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `parent` (*type:* `String.t`) - Required. The parent resource's name. ex. projects/123/locations/us-east1 * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1757,27 +4312,30 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - + * `:filter` (*type:* `String.t`) - A filter expression that filters the results listed in the response. + * `:orderBy` (*type:* `String.t`) - Sort the results by a certain order. + * `:pageSize` (*type:* `integer()`) - The maximum number of results per page that should be returned. + * `:pageToken` (*type:* `String.t`) - The page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionPoliciesResponse{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_service_classes_set_iam_policy( + @spec networkconnectivity_projects_locations_service_connection_policies_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionPoliciesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_service_classes_set_iam_policy( + def networkconnectivity_projects_locations_service_connection_policies_list( connection, - resource, + parent, optional_params \\ [], opts \\ [] ) do @@ -1793,30 +4351,36 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :body => :body + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query } request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/{+resource}:setIamPolicy", %{ - "resource" => URI.encode(resource, &URI.char_unreserved?/1) + |> Request.method(:get) + |> Request.url("/v1/{+parent}/serviceConnectionPolicies", %{ + "parent" => URI.encode(parent, &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.NetworkConnectivity.V1.Model.Policy{}]) + |> Response.decode( + opts ++ + [struct: %GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionPoliciesResponse{}] + ) end @doc """ - Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + Updates the parameters of a single ServiceConnectionPolicy. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `name` (*type:* `String.t`) - Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1829,27 +4393,29 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - + * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:updateMask` (*type:* `String.t`) - Optional. Field mask is used to specify the fields to be overwritten in the ServiceConnectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_service_classes_test_iam_permissions( + @spec networkconnectivity_projects_locations_service_connection_policies_patch( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_service_classes_test_iam_permissions( + def networkconnectivity_projects_locations_service_connection_policies_patch( connection, - resource, + name, optional_params \\ [], opts \\ [] ) do @@ -1865,14 +4431,16 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :requestId => :query, + :updateMask => :query, :body => :body } request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/{+resource}:testIamPermissions", %{ - "resource" => URI.encode(resource, &URI.char_unreserved?/1) + |> Request.method(:patch) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) @@ -1880,17 +4448,17 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] ) end @doc """ - Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1903,7 +4471,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:"options.requestedPolicyVersion"` (*type:* `integer()`) - Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -1911,7 +4479,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_service_connection_maps_get_iam_policy( + @spec networkconnectivity_projects_locations_service_connection_policies_set_iam_policy( Tesla.Env.client(), String.t(), keyword(), @@ -1921,7 +4489,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_service_connection_maps_get_iam_policy( + def networkconnectivity_projects_locations_service_connection_policies_set_iam_policy( connection, resource, optional_params \\ [], @@ -1939,13 +4507,13 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :"options.requestedPolicyVersion" => :query + :body => :body } request = Request.new() - |> Request.method(:get) - |> Request.url("/v1/{+resource}:getIamPolicy", %{ + |> Request.method(:post) + |> Request.url("/v1/{+resource}:setIamPolicy", %{ "resource" => URI.encode(resource, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1957,12 +4525,12 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do end @doc """ - Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1975,25 +4543,25 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_service_connection_maps_set_iam_policy( + @spec networkconnectivity_projects_locations_service_connection_policies_test_iam_permissions( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_service_connection_maps_set_iam_policy( + def networkconnectivity_projects_locations_service_connection_policies_test_iam_permissions( connection, resource, optional_params \\ [], @@ -2017,7 +4585,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do request = Request.new() |> Request.method(:post) - |> Request.url("/v1/{+resource}:setIamPolicy", %{ + |> Request.url("/v1/{+resource}:testIamPermissions", %{ "resource" => URI.encode(resource, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -2025,16 +4593,18 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.Policy{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] + ) end @doc """ - Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + Creates a new ServiceConnectionToken in a given project and location. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `parent` (*type:* `String.t`) - Required. The parent resource's name of the ServiceConnectionToken. ex. projects/123/locations/us-east1 * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -2047,27 +4617,29 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - + * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:serviceConnectionTokenId` (*type:* `String.t`) - Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/ServiceConnectionTokens/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. If one is not provided, one will be generated. + * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_service_connection_maps_test_iam_permissions( + @spec networkconnectivity_projects_locations_service_connection_tokens_create( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_service_connection_maps_test_iam_permissions( + def networkconnectivity_projects_locations_service_connection_tokens_create( connection, - resource, + parent, optional_params \\ [], opts \\ [] ) do @@ -2083,14 +4655,16 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :requestId => :query, + :serviceConnectionTokenId => :query, :body => :body } request = Request.new() |> Request.method(:post) - |> Request.url("/v1/{+resource}:testIamPermissions", %{ - "resource" => URI.encode(resource, &URI.char_unreserved?/1) + |> Request.url("/v1/{+parent}/serviceConnectionTokens", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) @@ -2098,17 +4672,17 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] ) end @doc """ - Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + Deletes a single ServiceConnectionToken. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `name` (*type:* `String.t`) - Required. The name of the ServiceConnectionToken to delete. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -2121,27 +4695,28 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:"options.requestedPolicyVersion"` (*type:* `integer()`) - Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * `:etag` (*type:* `String.t`) - Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + * `:requestId` (*type:* `String.t`) - Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_service_connection_policies_get_iam_policy( + @spec networkconnectivity_projects_locations_service_connection_tokens_delete( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_service_connection_policies_get_iam_policy( + def networkconnectivity_projects_locations_service_connection_tokens_delete( connection, - resource, + name, optional_params \\ [], opts \\ [] ) do @@ -2157,30 +4732,33 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :"options.requestedPolicyVersion" => :query + :etag => :query, + :requestId => :query } request = Request.new() - |> Request.method(:get) - |> Request.url("/v1/{+resource}:getIamPolicy", %{ - "resource" => URI.encode(resource, &URI.char_unreserved?/1) + |> Request.method(:delete) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.Policy{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation{}] + ) end @doc """ - Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + Gets details of a single ServiceConnectionToken. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `name` (*type:* `String.t`) - Required. Name of the ServiceConnectionToken to get. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -2193,27 +4771,26 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SetIamPolicyRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.Policy{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_service_connection_policies_set_iam_policy( + @spec networkconnectivity_projects_locations_service_connection_tokens_get( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.Policy.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_service_connection_policies_set_iam_policy( + def networkconnectivity_projects_locations_service_connection_tokens_get( connection, - resource, + name, optional_params \\ [], opts \\ [] ) do @@ -2228,31 +4805,32 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :body => :body + :upload_protocol => :query } request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/{+resource}:setIamPolicy", %{ - "resource" => URI.encode(resource, &URI.char_unreserved?/1) + |> Request.method(:get) + |> Request.url("/v1/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.Policy{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken{}] + ) end @doc """ - Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + Lists ServiceConnectionTokens in a given project and location. ## Parameters * `connection` (*type:* `GoogleApi.NetworkConnectivity.V1.Connection.t`) - Connection to server - * `resource` (*type:* `String.t`) - REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `parent` (*type:* `String.t`) - Required. The parent resource's name. ex. projects/123/locations/us-east1 * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -2265,27 +4843,30 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsRequest.t`) - + * `:filter` (*type:* `String.t`) - A filter expression that filters the results listed in the response. + * `:orderBy` (*type:* `String.t`) - Sort the results by a certain order. + * `:pageSize` (*type:* `integer()`) - The maximum number of results per page that should be returned. + * `:pageToken` (*type:* `String.t`) - The page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:ok, %GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionTokensResponse{}}` on success * `{:error, info}` on failure """ - @spec networkconnectivity_projects_locations_service_connection_policies_test_iam_permissions( + @spec networkconnectivity_projects_locations_service_connection_tokens_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse.t()} + {:ok, GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionTokensResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def networkconnectivity_projects_locations_service_connection_policies_test_iam_permissions( + def networkconnectivity_projects_locations_service_connection_tokens_list( connection, - resource, + parent, optional_params \\ [], opts \\ [] ) do @@ -2301,14 +4882,17 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :body => :body + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query } request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/{+resource}:testIamPermissions", %{ - "resource" => URI.encode(resource, &URI.char_unreserved?/1) + |> Request.method(:get) + |> Request.url("/v1/{+parent}/serviceConnectionTokens", %{ + "parent" => URI.encode(parent, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) @@ -2316,7 +4900,8 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.NetworkConnectivity.V1.Model.TestIamPermissionsResponse{}] + opts ++ + [struct: %GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionTokensResponse{}] ) end @@ -2339,7 +4924,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:requestId` (*type:* `String.t`) - Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:requestId` (*type:* `String.t`) - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * `:spokeId` (*type:* `String.t`) - Required. Unique id for the spoke to create. * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.Spoke.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -2417,7 +5002,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:requestId` (*type:* `String.t`) - Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:requestId` (*type:* `String.t`) - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -2633,9 +5218,9 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:filter` (*type:* `String.t`) - An expression that filters the results listed in the response. + * `:filter` (*type:* `String.t`) - An expression that filters the list of results. * `:orderBy` (*type:* `String.t`) - Sort the results by a certain order. - * `:pageSize` (*type:* `integer()`) - The maximum number of results per page that should be returned. + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return per page. * `:pageToken` (*type:* `String.t`) - The page token. * `opts` (*type:* `keyword()`) - Call options @@ -2713,7 +5298,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:requestId` (*type:* `String.t`) - Optional. A unique request ID (optional). If you specify this ID, you can use it in cases when you need to retry your request. When you need to retry, this ID lets the server know that it can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `:requestId` (*type:* `String.t`) - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * `:updateMask` (*type:* `String.t`) - Optional. In the case of an update to an existing spoke, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten. * `:body` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.Spoke.t`) - * `opts` (*type:* `keyword()`) - Call options diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/metadata.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/metadata.ex index 579df0e274..70c6c81085 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/metadata.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.NetworkConnectivity.V1 do API client metadata for GoogleApi.NetworkConnectivity.V1. """ - @discovery_revision "20221020" + @discovery_revision "20240228" def discovery_revision(), do: @discovery_revision end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/accept_hub_spoke_request.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/accept_hub_spoke_request.ex new file mode 100644 index 0000000000..2a1918840b --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/accept_hub_spoke_request.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.NetworkConnectivity.V1.Model.AcceptHubSpokeRequest do + @moduledoc """ + The request for HubService.AcceptHubSpoke. + + ## Attributes + + * `requestId` (*type:* `String.t`, *default:* `nil`) - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `spokeUri` (*type:* `String.t`, *default:* `nil`) - Required. The URI of the spoke to accept into the hub. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :requestId => String.t() | nil, + :spokeUri => String.t() | nil + } + + field(:requestId) + field(:spokeUri) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.AcceptHubSpokeRequest do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.AcceptHubSpokeRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.AcceptHubSpokeRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/accept_hub_spoke_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/accept_hub_spoke_response.ex new file mode 100644 index 0000000000..79ad28a5bb --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/accept_hub_spoke_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.NetworkConnectivity.V1.Model.AcceptHubSpokeResponse do + @moduledoc """ + The response for HubService.AcceptHubSpoke. + + ## Attributes + + * `spoke` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.Spoke.t`, *default:* `nil`) - The spoke that was operated on. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :spoke => GoogleApi.NetworkConnectivity.V1.Model.Spoke.t() | nil + } + + field(:spoke, as: GoogleApi.NetworkConnectivity.V1.Model.Spoke) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.AcceptHubSpokeResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.AcceptHubSpokeResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.AcceptHubSpokeResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/binding.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/binding.ex index 7ce3d97ff6..5e8ab22bee 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/binding.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/binding.ex @@ -22,8 +22,8 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.Expr.t`, *default:* `nil`) - The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. - * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). """ use GoogleApi.Gax.ModelBase diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/consumer_psc_config.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/consumer_psc_config.ex new file mode 100644 index 0000000000..1ce934c10a --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/consumer_psc_config.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.NetworkConnectivity.V1.Model.ConsumerPscConfig do + @moduledoc """ + Allow the producer to specify which consumers can connect to it. + + ## Attributes + + * `disableGlobalAccess` (*type:* `boolean()`, *default:* `nil`) - This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region. + * `network` (*type:* `String.t`, *default:* `nil`) - The resource path of the consumer network where PSC connections are allowed to be created in. Note, this network does not need be in the ConsumerPscConfig.project in the case of SharedVPC. Example: projects/{projectNumOrId}/global/networks/{networkId}. + * `project` (*type:* `String.t`, *default:* `nil`) - The consumer project where PSC connections are allowed to be created in. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. Overall state of PSC Connections management for this consumer psc config. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :disableGlobalAccess => boolean() | nil, + :network => String.t() | nil, + :project => String.t() | nil, + :state => String.t() | nil + } + + field(:disableGlobalAccess) + field(:network) + field(:project) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConfig do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/consumer_psc_connection.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/consumer_psc_connection.ex new file mode 100644 index 0000000000..4faa9dcf2e --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/consumer_psc_connection.ex @@ -0,0 +1,79 @@ +# 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.NetworkConnectivity.V1.Model.ConsumerPscConnection do + @moduledoc """ + PSC connection details on consumer side. + + ## Attributes + + * `error` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcStatus.t`, *default:* `nil`) - The most recent error during operating this connection. + * `errorInfo` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcErrorInfo.t`, *default:* `nil`) - Output only. The error info for the latest error during operating this connection. + * `errorType` (*type:* `String.t`, *default:* `nil`) - The error type indicates whether the error is consumer facing, producer facing or system internal. + * `forwardingRule` (*type:* `String.t`, *default:* `nil`) - The URI of the consumer forwarding rule created. Example: projects/{projectNumOrId}/regions/us-east1/networks/{resourceId}. + * `gceOperation` (*type:* `String.t`, *default:* `nil`) - The last Compute Engine operation to setup PSC connection. + * `ip` (*type:* `String.t`, *default:* `nil`) - The IP literal allocated on the consumer network for the PSC forwarding rule that is created to connect to the producer service attachment in this service connection map. + * `network` (*type:* `String.t`, *default:* `nil`) - The consumer network whose PSC forwarding rule is connected to the service attachments in this service connection map. Note that the network could be on a different project (shared VPC). + * `project` (*type:* `String.t`, *default:* `nil`) - The consumer project whose PSC forwarding rule is connected to the service attachments in this service connection map. + * `pscConnectionId` (*type:* `String.t`, *default:* `nil`) - The PSC connection id of the PSC forwarding rule connected to the service attachments in this service connection map. + * `selectedSubnetwork` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of the selected subnetwork selected to allocate IP address for this connection. + * `serviceAttachmentUri` (*type:* `String.t`, *default:* `nil`) - The URI of a service attachment which is the target of the PSC connection. + * `state` (*type:* `String.t`, *default:* `nil`) - The state of the PSC connection. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :error => GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcStatus.t() | nil, + :errorInfo => GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcErrorInfo.t() | nil, + :errorType => String.t() | nil, + :forwardingRule => String.t() | nil, + :gceOperation => String.t() | nil, + :ip => String.t() | nil, + :network => String.t() | nil, + :project => String.t() | nil, + :pscConnectionId => String.t() | nil, + :selectedSubnetwork => String.t() | nil, + :serviceAttachmentUri => String.t() | nil, + :state => String.t() | nil + } + + field(:error, as: GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcStatus) + field(:errorInfo, as: GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcErrorInfo) + field(:errorType) + field(:forwardingRule) + field(:gceOperation) + field(:ip) + field(:network) + field(:project) + field(:pscConnectionId) + field(:selectedSubnetwork) + field(:serviceAttachmentUri) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConnection do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConnection.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConnection do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/filter.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/filter.ex new file mode 100644 index 0000000000..f2d68d5a77 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/filter.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.NetworkConnectivity.V1.Model.Filter do + @moduledoc """ + Filter matches L4 traffic. + + ## Attributes + + * `destRange` (*type:* `String.t`, *default:* `nil`) - Optional. The destination IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. + * `ipProtocol` (*type:* `String.t`, *default:* `nil`) - Optional. The IP protocol that this policy-based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. + * `protocolVersion` (*type:* `String.t`, *default:* `nil`) - Required. Internet protocol versions this policy-based route applies to. For this version, only IPV4 is supported. + * `srcRange` (*type:* `String.t`, *default:* `nil`) - Optional. The source IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :destRange => String.t() | nil, + :ipProtocol => String.t() | nil, + :protocolVersion => String.t() | nil, + :srcRange => String.t() | nil + } + + field(:destRange) + field(:ipProtocol) + field(:protocolVersion) + field(:srcRange) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.Filter do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.Filter.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.Filter do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/google_longrunning_operation.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/google_longrunning_operation.ex index 9b7febf02f..f7e5c9405c 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/google_longrunning_operation.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/google_longrunning_operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.GoogleLongrunningOperation do * `error` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcStatus.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. * `name` (*type:* `String.t`, *default:* `nil`) - The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. - * `response` (*type:* `map()`, *default:* `nil`) - The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + * `response` (*type:* `map()`, *default:* `nil`) - The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. """ use GoogleApi.Gax.ModelBase diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/google_rpc_error_info.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/google_rpc_error_info.ex new file mode 100644 index 0000000000..37822a871e --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/google_rpc_error_info.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.NetworkConnectivity.V1.Model.GoogleRpcErrorInfo do + @moduledoc """ + Describes the cause of the error with structured details. Example of an error when contacting the "pubsub.googleapis.com" API when it is not enabled: { "reason": "API_DISABLED" "domain": "googleapis.com" "metadata": { "resource": "projects/123", "service": "pubsub.googleapis.com" } } This response indicates that the pubsub.googleapis.com API is not enabled. Example of an error that is returned when attempting to create a Spanner instance in a region that is out of stock: { "reason": "STOCKOUT" "domain": "spanner.googleapis.com", "metadata": { "availableRegions": "us-central1,us-east2" } } + + ## Attributes + + * `domain` (*type:* `String.t`, *default:* `nil`) - The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com". + * `metadata` (*type:* `map()`, *default:* `nil`) - Additional structured details about this error. Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. + * `reason` (*type:* `String.t`, *default:* `nil`) - The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :domain => String.t() | nil, + :metadata => map() | nil, + :reason => String.t() | nil + } + + field(:domain) + field(:metadata, type: :map) + field(:reason) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcErrorInfo do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcErrorInfo.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcErrorInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/group.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/group.ex new file mode 100644 index 0000000000..35d51d4d3a --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/group.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.NetworkConnectivity.V1.Model.Group do + @moduledoc """ + A group represents a subset of spokes attached to a hub. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the group was created. + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. The description of the group. + * `labels` (*type:* `map()`, *default:* `nil`) - Optional. Labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the group. Group names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}` + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current lifecycle state of this group. + * `uid` (*type:* `String.t`, *default:* `nil`) - Output only. The Google-generated UUID for the group. This value is unique across all group resources. If a group is deleted and another with the same name is created, the new route table is assigned a different unique_id. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the group was last updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :labels => map() | nil, + :name => String.t() | nil, + :state => String.t() | nil, + :uid => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:labels, type: :map) + field(:name) + field(:state) + field(:uid) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.Group do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.Group.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.Group do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/hub.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/hub.ex index 0164e3fc6b..0bc1c3eb20 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/hub.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/hub.ex @@ -17,15 +17,17 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Hub do @moduledoc """ - A Network Connectivity Center hub is a collection of spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the data transfer feature, the resources associated with those spokes must all reside in the same VPC network. Spokes that do not use data transfer can be associated with any VPC network in your project. + A Network Connectivity Center hub is a global management resource to which you attach spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the site-to-site data transfer feature, the resources associated with those spokes must all be in the same VPC network. Spokes that do not use site-to-site data transfer can be associated with any VPC network in your project. ## Attributes * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the hub was created. * `description` (*type:* `String.t`, *default:* `nil`) - An optional description of the hub. - * `labels` (*type:* `map()`, *default:* `nil`) - Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * `labels` (*type:* `map()`, *default:* `nil`) - Optional labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the hub. Hub names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub_id}` + * `routeTables` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The route tables that belong to this hub. They use the following form: `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` This field is read-only. Network Connectivity Center automatically populates it based on the route tables nested under the hub. * `routingVpcs` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.RoutingVPC.t)`, *default:* `nil`) - The VPC networks associated with this hub's spokes. This field is read-only. Network Connectivity Center automatically populates it based on the set of spokes attached to the hub. + * `spokeSummary` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.SpokeSummary.t`, *default:* `nil`) - Output only. A summary of the spokes associated with a hub. The summary includes a count of spokes according to type and according to state. If any spokes are inactive, the summary also lists the reasons they are inactive, including a count for each reason. * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current lifecycle state of this hub. * `uniqueId` (*type:* `String.t`, *default:* `nil`) - Output only. The Google-generated UUID for the hub. This value is unique across all hub resources. If a hub is deleted and another with the same name is created, the new hub is assigned a different unique_id. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the hub was last updated. @@ -38,7 +40,9 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Hub do :description => String.t() | nil, :labels => map() | nil, :name => String.t() | nil, + :routeTables => list(String.t()) | nil, :routingVpcs => list(GoogleApi.NetworkConnectivity.V1.Model.RoutingVPC.t()) | nil, + :spokeSummary => GoogleApi.NetworkConnectivity.V1.Model.SpokeSummary.t() | nil, :state => String.t() | nil, :uniqueId => String.t() | nil, :updateTime => DateTime.t() | nil @@ -48,7 +52,9 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Hub do field(:description) field(:labels, type: :map) field(:name) + field(:routeTables, type: :list) field(:routingVpcs, as: GoogleApi.NetworkConnectivity.V1.Model.RoutingVPC, type: :list) + field(:spokeSummary, as: GoogleApi.NetworkConnectivity.V1.Model.SpokeSummary) field(:state) field(:uniqueId) field(:updateTime, as: DateTime) diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/interconnect_attachment.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/interconnect_attachment.ex new file mode 100644 index 0000000000..c4720bf98b --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/interconnect_attachment.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.NetworkConnectivity.V1.Model.InterconnectAttachment do + @moduledoc """ + InterconnectAttachment that this route applies to. + + ## Attributes + + * `region` (*type:* `String.t`, *default:* `nil`) - Optional. Cloud region to install this policy-based route on interconnect attachment. Use `all` to install it on all interconnect attachments. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :region => String.t() | nil + } + + field(:region) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.InterconnectAttachment do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.InterconnectAttachment.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.InterconnectAttachment do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/internal_range.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/internal_range.ex index 901a9a65da..1f47f08b1b 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/internal_range.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/internal_range.ex @@ -17,23 +17,23 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.InternalRange do @moduledoc """ - The InternalRange resource for IPAM operations within a VPC network. Used to represent a private address range along with behavioral characterstics of that range (it's usage and peering behavior). Networking resources can link to this range if they are created as belonging to it. Next id: 14 + The internal range resource for IPAM operations within a VPC network. Used to represent a private address range along with behavioral characterstics of that range (its usage and peering behavior). Networking resources can link to this range if they are created as belonging to it. ## Attributes - * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Time when the InternalRange was created. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Time when the internal range was created. * `description` (*type:* `String.t`, *default:* `nil`) - A description of this resource. - * `ipCidrRange` (*type:* `String.t`, *default:* `nil`) - IP range that this InternalRange defines. + * `ipCidrRange` (*type:* `String.t`, *default:* `nil`) - The IP range that this internal range defines. * `labels` (*type:* `map()`, *default:* `nil`) - User-defined labels. - * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of a InternalRange. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names - * `network` (*type:* `String.t`, *default:* `nil`) - The URL or resource ID of the network in which to reserve the Internal Range. The network cannot be deleted if there are any reserved Internal Ranges referring to it. Legacy network is not supported. This can only be specified for a global internal address. Example: - URL: /compute/v1/projects/{project}/global/networks/{resourceId} - ID: network123 - * `overlaps` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Types of resources that are allowed to overlap with the current InternalRange. - * `peering` (*type:* `String.t`, *default:* `nil`) - The type of peering set for this InternalRange. - * `prefixLength` (*type:* `integer()`, *default:* `nil`) - An alternate to ip_cidr_range. Can be set when trying to create a reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, it's an error if the range sizes don't match. Can also be used during updates to change the range size. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of an internal range. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names + * `network` (*type:* `String.t`, *default:* `nil`) - The URL or resource ID of the network in which to reserve the internal range. The network cannot be deleted if there are any reserved internal ranges referring to it. Legacy networks are not supported. This can only be specified for a global internal address. Example: - URL: /compute/v1/projects/{project}/global/networks/{resourceId} - ID: network123 + * `overlaps` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Types of resources that are allowed to overlap with the current internal range. + * `peering` (*type:* `String.t`, *default:* `nil`) - The type of peering set for this internal range. + * `prefixLength` (*type:* `integer()`, *default:* `nil`) - An alternate to ip_cidr_range. Can be set when trying to create a reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size. * `targetCidrRange` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Can be set to narrow down or pick a different address space while searching for a free range. If not set, defaults to the "10.0.0.0/8" address space. This can be used to search in other rfc-1918 address spaces like "172.16.0.0/12" and "192.168.0.0/16" or non-rfc-1918 address spaces used in the VPC. - * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Time when the InternalRange was updated. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Time when the internal range was updated. * `usage` (*type:* `String.t`, *default:* `nil`) - The type of usage set for this InternalRange. - * `users` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The list of resources that refer to this internal range. Resources that use the InternalRange for their range allocation are referred to as users of the range. Other resources mark themselves as users while doing so by creating a reference to this InternalRange. Having a user, based on this reference, prevents deletion of the InternalRange referred to. Can be empty. + * `users` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The list of resources that refer to this internal range. Resources that use the internal range for their range allocation are referred to as users of the range. Other resources mark themselves as users while doing so by creating a reference to this internal range. Having a user, based on this reference, prevents deletion of the internal range referred to. Can be empty. """ use GoogleApi.Gax.ModelBase diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_vpc_network.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_vpc_network.ex new file mode 100644 index 0000000000..d1f68956e8 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_vpc_network.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.NetworkConnectivity.V1.Model.LinkedVpcNetwork do + @moduledoc """ + An existing VPC network. + + ## Attributes + + * `excludeExportRanges` (*type:* `list(String.t)`, *default:* `nil`) - Optional. IP ranges encompassing the subnets to be excluded from peering. + * `uri` (*type:* `String.t`, *default:* `nil`) - Required. The URI of the VPC network resource. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :excludeExportRanges => list(String.t()) | nil, + :uri => String.t() | nil + } + + field(:excludeExportRanges, type: :list) + field(:uri) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.LinkedVpcNetwork do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.LinkedVpcNetwork.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.LinkedVpcNetwork do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_groups_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_groups_response.ex new file mode 100644 index 0000000000..87829b2731 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_groups_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.NetworkConnectivity.V1.Model.ListGroupsResponse do + @moduledoc """ + Response for HubService.ListGroups method. + + ## Attributes + + * `groups` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.Group.t)`, *default:* `nil`) - The requested groups. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Hubs that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :groups => list(GoogleApi.NetworkConnectivity.V1.Model.Group.t()) | nil, + :nextPageToken => String.t() | nil, + :unreachable => list(String.t()) | nil + } + + field(:groups, as: GoogleApi.NetworkConnectivity.V1.Model.Group, type: :list) + field(:nextPageToken) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListGroupsResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ListGroupsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListGroupsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_hub_spokes_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_hub_spokes_response.ex new file mode 100644 index 0000000000..af094e37c8 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_hub_spokes_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.NetworkConnectivity.V1.Model.ListHubSpokesResponse do + @moduledoc """ + The response for HubService.ListHubSpokes. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results. + * `spokes` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.Spoke.t)`, *default:* `nil`) - The requested spokes. The spoke fields can be partially populated based on the `view` field in the request message. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :spokes => list(GoogleApi.NetworkConnectivity.V1.Model.Spoke.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + field(:spokes, as: GoogleApi.NetworkConnectivity.V1.Model.Spoke, type: :list) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListHubSpokesResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ListHubSpokesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListHubSpokesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_hubs_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_hubs_response.ex index 3adb070df0..6f8e0411d7 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_hubs_response.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_hubs_response.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ListHubsResponse do ## Attributes * `hubs` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.Hub.t)`, *default:* `nil`) - The requested hubs. - * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results. * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. """ diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_internal_ranges_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_internal_ranges_response.ex index 38816740b4..127d8a8239 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_internal_ranges_response.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_internal_ranges_response.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ListInternalRangesResponse do ## Attributes - * `internalRanges` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.InternalRange.t)`, *default:* `nil`) - InternalRanges to be returned. + * `internalRanges` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.InternalRange.t)`, *default:* `nil`) - Internal ranges to be returned. * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result. * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. """ diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_policy_based_routes_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_policy_based_routes_response.ex new file mode 100644 index 0000000000..71f9111727 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_policy_based_routes_response.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.NetworkConnectivity.V1.Model.ListPolicyBasedRoutesResponse do + @moduledoc """ + Response for PolicyBasedRouting.ListPolicyBasedRoutes method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result. + * `policyBasedRoutes` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.PolicyBasedRoute.t)`, *default:* `nil`) - Policy-based routes to be returned. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :policyBasedRoutes => + list(GoogleApi.NetworkConnectivity.V1.Model.PolicyBasedRoute.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + + field(:policyBasedRoutes, + as: GoogleApi.NetworkConnectivity.V1.Model.PolicyBasedRoute, + type: :list + ) + + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListPolicyBasedRoutesResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ListPolicyBasedRoutesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListPolicyBasedRoutesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_route_tables_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_route_tables_response.ex new file mode 100644 index 0000000000..d969f84bf6 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_route_tables_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.NetworkConnectivity.V1.Model.ListRouteTablesResponse do + @moduledoc """ + Response for HubService.ListRouteTables method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results. + * `routeTables` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.RouteTable.t)`, *default:* `nil`) - The requested route tables. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Hubs that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :routeTables => list(GoogleApi.NetworkConnectivity.V1.Model.RouteTable.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + field(:routeTables, as: GoogleApi.NetworkConnectivity.V1.Model.RouteTable, type: :list) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListRouteTablesResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ListRouteTablesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListRouteTablesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_routes_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_routes_response.ex new file mode 100644 index 0000000000..6743b3f302 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_routes_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.NetworkConnectivity.V1.Model.ListRoutesResponse do + @moduledoc """ + Response for HubService.ListRoutes method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results. + * `routes` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.Route.t)`, *default:* `nil`) - The requested routes. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - RouteTables that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :routes => list(GoogleApi.NetworkConnectivity.V1.Model.Route.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + field(:routes, as: GoogleApi.NetworkConnectivity.V1.Model.Route, type: :list) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListRoutesResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ListRoutesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListRoutesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_classes_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_classes_response.ex new file mode 100644 index 0000000000..c990c35d72 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_classes_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.NetworkConnectivity.V1.Model.ListServiceClassesResponse do + @moduledoc """ + Response for ListServiceClasses. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result. + * `serviceClasses` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.ServiceClass.t)`, *default:* `nil`) - ServiceClasses to be returned. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :serviceClasses => list(GoogleApi.NetworkConnectivity.V1.Model.ServiceClass.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + field(:serviceClasses, as: GoogleApi.NetworkConnectivity.V1.Model.ServiceClass, type: :list) + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListServiceClassesResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ListServiceClassesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ListServiceClassesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_maps_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_maps_response.ex new file mode 100644 index 0000000000..675f4d2c00 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_maps_response.ex @@ -0,0 +1,63 @@ +# 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.NetworkConnectivity.V1.Model.ListServiceConnectionMapsResponse do + @moduledoc """ + Response for ListServiceConnectionMaps. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result. + * `serviceConnectionMaps` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap.t)`, *default:* `nil`) - ServiceConnectionMaps to be returned. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :serviceConnectionMaps => + list(GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + + field(:serviceConnectionMaps, + as: GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap, + type: :list + ) + + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionMapsResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionMapsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionMapsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_policies_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_policies_response.ex new file mode 100644 index 0000000000..b93a1e5a08 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_policies_response.ex @@ -0,0 +1,63 @@ +# 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.NetworkConnectivity.V1.Model.ListServiceConnectionPoliciesResponse do + @moduledoc """ + Response for ListServiceConnectionPolicies. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result. + * `serviceConnectionPolicies` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy.t)`, *default:* `nil`) - ServiceConnectionPolicies to be returned. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :serviceConnectionPolicies => + list(GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + + field(:serviceConnectionPolicies, + as: GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy, + type: :list + ) + + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionPoliciesResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionPoliciesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionPoliciesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_tokens_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_tokens_response.ex new file mode 100644 index 0000000000..15b0ee3366 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_service_connection_tokens_response.ex @@ -0,0 +1,63 @@ +# 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.NetworkConnectivity.V1.Model.ListServiceConnectionTokensResponse do + @moduledoc """ + Response for ListServiceConnectionTokens. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result. + * `serviceConnectionTokens` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken.t)`, *default:* `nil`) - ServiceConnectionTokens to be returned. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :serviceConnectionTokens => + list(GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken.t()) | nil, + :unreachable => list(String.t()) | nil + } + + field(:nextPageToken) + + field(:serviceConnectionTokens, + as: GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken, + type: :list + ) + + field(:unreachable, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionTokensResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionTokensResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.NetworkConnectivity.V1.Model.ListServiceConnectionTokensResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_spokes_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_spokes_response.ex index 31572f2e1b..10ec5a83a5 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_spokes_response.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/list_spokes_response.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.ListSpokesResponse do ## Attributes - * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results. * `spokes` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.Spoke.t)`, *default:* `nil`) - The requested spokes. * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Locations that could not be reached. """ diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/location.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/location.ex index 1eef836da5..26a36f3e44 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/location.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/location.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.NetworkConnectivity.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/network_connectivity/lib/google_api/network_connectivity/v1/model/next_hop_vpc_network.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/next_hop_vpc_network.ex new file mode 100644 index 0000000000..f9010a12ce --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/next_hop_vpc_network.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.NetworkConnectivity.V1.Model.NextHopVpcNetwork do + @moduledoc """ + + + ## Attributes + + * `uri` (*type:* `String.t`, *default:* `nil`) - The URI of the VPC network resource + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :uri => String.t() | nil + } + + field(:uri) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.NextHopVpcNetwork do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.NextHopVpcNetwork.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.NextHopVpcNetwork do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/policy.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/policy.ex index 268c3c3e0f..534e577c2c 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/policy.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Policy do @moduledoc """ - An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). ## Attributes diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/policy_based_route.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/policy_based_route.ex new file mode 100644 index 0000000000..2d8d79ce40 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/policy_based_route.ex @@ -0,0 +1,91 @@ +# 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.NetworkConnectivity.V1.Model.PolicyBasedRoute do + @moduledoc """ + Policy-based routes route L4 network traffic based on not just destination IP address, but also source IP address, protocol, and more. If a policy-based route conflicts with other types of routes, the policy-based route always take precedence. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the policy-based route was created. + * `description` (*type:* `String.t`, *default:* `nil`) - Optional. An optional description of this resource. Provide this field when you create the resource. + * `filter` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.Filter.t`, *default:* `nil`) - Required. The filter to match L4 traffic. + * `interconnectAttachment` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.InterconnectAttachment.t`, *default:* `nil`) - Optional. The interconnect attachments that this policy-based route applies to. + * `kind` (*type:* `String.t`, *default:* `nil`) - Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for policy-based Route resources. + * `labels` (*type:* `map()`, *default:* `nil`) - User-defined labels. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. A unique name of the resource in the form of `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` + * `network` (*type:* `String.t`, *default:* `nil`) - Required. Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network. + * `nextHopIlbIp` (*type:* `String.t`, *default:* `nil`) - Optional. The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets. For this version, only nextHopIlbIp is supported. + * `nextHopOtherRoutes` (*type:* `String.t`, *default:* `nil`) - Optional. Other routes that will be referenced to determine the next hop of the packet. + * `priority` (*type:* `integer()`, *default:* `nil`) - Optional. The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive. + * `selfLink` (*type:* `String.t`, *default:* `nil`) - Output only. Server-defined fully-qualified URL for this resource. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the policy-based route was updated. + * `virtualMachine` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.VirtualMachine.t`, *default:* `nil`) - Optional. VM instances to which this policy-based route applies to. + * `warnings` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.Warnings.t)`, *default:* `nil`) - Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :filter => GoogleApi.NetworkConnectivity.V1.Model.Filter.t() | nil, + :interconnectAttachment => + GoogleApi.NetworkConnectivity.V1.Model.InterconnectAttachment.t() | nil, + :kind => String.t() | nil, + :labels => map() | nil, + :name => String.t() | nil, + :network => String.t() | nil, + :nextHopIlbIp => String.t() | nil, + :nextHopOtherRoutes => String.t() | nil, + :priority => integer() | nil, + :selfLink => String.t() | nil, + :updateTime => DateTime.t() | nil, + :virtualMachine => GoogleApi.NetworkConnectivity.V1.Model.VirtualMachine.t() | nil, + :warnings => list(GoogleApi.NetworkConnectivity.V1.Model.Warnings.t()) | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:filter, as: GoogleApi.NetworkConnectivity.V1.Model.Filter) + + field(:interconnectAttachment, as: GoogleApi.NetworkConnectivity.V1.Model.InterconnectAttachment) + + field(:kind) + field(:labels, type: :map) + field(:name) + field(:network) + field(:nextHopIlbIp) + field(:nextHopOtherRoutes) + field(:priority) + field(:selfLink) + field(:updateTime, as: DateTime) + field(:virtualMachine, as: GoogleApi.NetworkConnectivity.V1.Model.VirtualMachine) + field(:warnings, as: GoogleApi.NetworkConnectivity.V1.Model.Warnings, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.PolicyBasedRoute do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.PolicyBasedRoute.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.PolicyBasedRoute do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/producer_psc_config.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/producer_psc_config.ex new file mode 100644 index 0000000000..c915e21762 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/producer_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.NetworkConnectivity.V1.Model.ProducerPscConfig do + @moduledoc """ + The PSC configurations on producer side. + + ## Attributes + + * `serviceAttachmentUri` (*type:* `String.t`, *default:* `nil`) - The resource path of a service attachment. Example: projects/{projectNumOrId}/regions/{region}/serviceAttachments/{resourceId}. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :serviceAttachmentUri => String.t() | nil + } + + field(:serviceAttachmentUri) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ProducerPscConfig do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ProducerPscConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ProducerPscConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_config.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_config.ex new file mode 100644 index 0000000000..197147da04 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_config.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.NetworkConnectivity.V1.Model.PscConfig do + @moduledoc """ + Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. + + ## Attributes + + * `limit` (*type:* `String.t`, *default:* `nil`) - Optional. Max number of PSC connections for this policy. + * `subnetworks` (*type:* `list(String.t)`, *default:* `nil`) - The resource paths of subnetworks to use for IP address management. Example: projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :limit => String.t() | nil, + :subnetworks => list(String.t()) | nil + } + + field(:limit) + field(:subnetworks, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.PscConfig do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.PscConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.PscConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_connection.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_connection.ex new file mode 100644 index 0000000000..1ce40a0b5a --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/psc_connection.ex @@ -0,0 +1,73 @@ +# 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.NetworkConnectivity.V1.Model.PscConnection do + @moduledoc """ + Information about a specific Private Service Connect connection. + + ## Attributes + + * `consumerAddress` (*type:* `String.t`, *default:* `nil`) - The resource reference of the consumer address. + * `consumerForwardingRule` (*type:* `String.t`, *default:* `nil`) - The resource reference of the PSC Forwarding Rule within the consumer VPC. + * `consumerTargetProject` (*type:* `String.t`, *default:* `nil`) - The project where the PSC connection is created. + * `error` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcStatus.t`, *default:* `nil`) - The most recent error during operating this connection. + * `errorInfo` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcErrorInfo.t`, *default:* `nil`) - Output only. The error info for the latest error during operating this connection. + * `errorType` (*type:* `String.t`, *default:* `nil`) - The error type indicates whether the error is consumer facing, producer facing or system internal. + * `gceOperation` (*type:* `String.t`, *default:* `nil`) - The last Compute Engine operation to setup PSC connection. + * `pscConnectionId` (*type:* `String.t`, *default:* `nil`) - The PSC connection id of the PSC forwarding rule. + * `selectedSubnetwork` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of the subnetwork selected to allocate IP address for this connection. + * `state` (*type:* `String.t`, *default:* `nil`) - State of the PSC Connection + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :consumerAddress => String.t() | nil, + :consumerForwardingRule => String.t() | nil, + :consumerTargetProject => String.t() | nil, + :error => GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcStatus.t() | nil, + :errorInfo => GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcErrorInfo.t() | nil, + :errorType => String.t() | nil, + :gceOperation => String.t() | nil, + :pscConnectionId => String.t() | nil, + :selectedSubnetwork => String.t() | nil, + :state => String.t() | nil + } + + field(:consumerAddress) + field(:consumerForwardingRule) + field(:consumerTargetProject) + field(:error, as: GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcStatus) + field(:errorInfo, as: GoogleApi.NetworkConnectivity.V1.Model.GoogleRpcErrorInfo) + field(:errorType) + field(:gceOperation) + field(:pscConnectionId) + field(:selectedSubnetwork) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.PscConnection do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.PscConnection.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.PscConnection do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/reject_hub_spoke_request.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/reject_hub_spoke_request.ex new file mode 100644 index 0000000000..a0c194e79d --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/reject_hub_spoke_request.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.NetworkConnectivity.V1.Model.RejectHubSpokeRequest do + @moduledoc """ + The request for HubService.RejectHubSpoke. + + ## Attributes + + * `details` (*type:* `String.t`, *default:* `nil`) - Optional. Additional information provided by the hub administrator. + * `requestId` (*type:* `String.t`, *default:* `nil`) - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * `spokeUri` (*type:* `String.t`, *default:* `nil`) - Required. The URI of the spoke to reject from the hub. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :details => String.t() | nil, + :requestId => String.t() | nil, + :spokeUri => String.t() | nil + } + + field(:details) + field(:requestId) + field(:spokeUri) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.RejectHubSpokeRequest do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.RejectHubSpokeRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.RejectHubSpokeRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/reject_hub_spoke_response.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/reject_hub_spoke_response.ex new file mode 100644 index 0000000000..1011db4b6e --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/reject_hub_spoke_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.NetworkConnectivity.V1.Model.RejectHubSpokeResponse do + @moduledoc """ + The response for HubService.RejectHubSpoke. + + ## Attributes + + * `spoke` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.Spoke.t`, *default:* `nil`) - The spoke that was operated on. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :spoke => GoogleApi.NetworkConnectivity.V1.Model.Spoke.t() | nil + } + + field(:spoke, as: GoogleApi.NetworkConnectivity.V1.Model.Spoke) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.RejectHubSpokeResponse do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.RejectHubSpokeResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.RejectHubSpokeResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/route.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/route.ex new file mode 100644 index 0000000000..eace22db67 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/route.ex @@ -0,0 +1,80 @@ +# 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.NetworkConnectivity.V1.Model.Route do + @moduledoc """ + A route defines a path from VM instances within a spoke to a specific destination resource. Only VPC spokes have routes. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the route was created. + * `description` (*type:* `String.t`, *default:* `nil`) - An optional description of the route. + * `ipCidrRange` (*type:* `String.t`, *default:* `nil`) - The destination IP address range. + * `labels` (*type:* `map()`, *default:* `nil`) - Optional labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * `location` (*type:* `String.t`, *default:* `nil`) - Output only. The origin location of the route. Uses the following form: "projects/{project}/locations/{location}" Example: projects/1234/locations/us-central1 + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the route. Route names must be unique. Route names use the following form: `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}` + * `nextHopVpcNetwork` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.NextHopVpcNetwork.t`, *default:* `nil`) - Immutable. The destination VPC network for packets on this route. + * `spoke` (*type:* `String.t`, *default:* `nil`) - Immutable. The spoke that this route leads to. Example: projects/12345/locations/global/spokes/SPOKE + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current lifecycle state of the route. + * `type` (*type:* `String.t`, *default:* `nil`) - Output only. The route's type. Its type is determined by the properties of its IP address range. + * `uid` (*type:* `String.t`, *default:* `nil`) - Output only. The Google-generated UUID for the route. This value is unique across all Network Connectivity Center route resources. If a route is deleted and another with the same name is created, the new route is assigned a different `uid`. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the route was last updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :ipCidrRange => String.t() | nil, + :labels => map() | nil, + :location => String.t() | nil, + :name => String.t() | nil, + :nextHopVpcNetwork => + GoogleApi.NetworkConnectivity.V1.Model.NextHopVpcNetwork.t() | nil, + :spoke => String.t() | nil, + :state => String.t() | nil, + :type => String.t() | nil, + :uid => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:ipCidrRange) + field(:labels, type: :map) + field(:location) + field(:name) + field(:nextHopVpcNetwork, as: GoogleApi.NetworkConnectivity.V1.Model.NextHopVpcNetwork) + field(:spoke) + field(:state) + field(:type) + field(:uid) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.Route do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.Route.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.Route do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/route_table.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/route_table.ex new file mode 100644 index 0000000000..291d04837b --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/route_table.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.NetworkConnectivity.V1.Model.RouteTable do + @moduledoc """ + + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the route table was created. + * `description` (*type:* `String.t`, *default:* `nil`) - An optional description of the route table. + * `labels` (*type:* `map()`, *default:* `nil`) - Optional labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the route table. Route table names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}` + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current lifecycle state of this route table. + * `uid` (*type:* `String.t`, *default:* `nil`) - Output only. The Google-generated UUID for the route table. This value is unique across all route table resources. If a route table is deleted and another with the same name is created, the new route table is assigned a different `uid`. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the route table was last updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :labels => map() | nil, + :name => String.t() | nil, + :state => String.t() | nil, + :uid => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:labels, type: :map) + field(:name) + field(:state) + field(:uid) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.RouteTable do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.RouteTable.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.RouteTable do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_class.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_class.ex new file mode 100644 index 0000000000..ae024206a2 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_class.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.NetworkConnectivity.V1.Model.ServiceClass do + @moduledoc """ + The ServiceClass resource. Next id: 9 + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the ServiceClass was created. + * `description` (*type:* `String.t`, *default:* `nil`) - A description of this resource. + * `etag` (*type:* `String.t`, *default:* `nil`) - Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + * `labels` (*type:* `map()`, *default:* `nil`) - User-defined labels. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of a ServiceClass resource. Format: projects/{project}/locations/{location}/serviceClasses/{service_class} See: https://google.aip.dev/122#fields-representing-resource-names + * `serviceClass` (*type:* `String.t`, *default:* `nil`) - Output only. The generated service class name. Use this name to refer to the Service class in Service Connection Maps and Service Connection Policies. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the ServiceClass was updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :etag => String.t() | nil, + :labels => map() | nil, + :name => String.t() | nil, + :serviceClass => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:etag) + field(:labels, type: :map) + field(:name) + field(:serviceClass) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ServiceClass do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ServiceClass.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ServiceClass do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_map.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_map.ex new file mode 100644 index 0000000000..67938b4422 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_map.ex @@ -0,0 +1,98 @@ +# 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.NetworkConnectivity.V1.Model.ServiceConnectionMap do + @moduledoc """ + The ServiceConnectionMap resource. Next id: 15 + + ## Attributes + + * `consumerPscConfigs` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConfig.t)`, *default:* `nil`) - The PSC configurations on consumer side. + * `consumerPscConnections` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConnection.t)`, *default:* `nil`) - Output only. PSC connection details on consumer side. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the ServiceConnectionMap was created. + * `description` (*type:* `String.t`, *default:* `nil`) - A description of this resource. + * `etag` (*type:* `String.t`, *default:* `nil`) - Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + * `infrastructure` (*type:* `String.t`, *default:* `nil`) - Output only. The infrastructure used for connections between consumers/producers. + * `labels` (*type:* `map()`, *default:* `nil`) - User-defined labels. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of a ServiceConnectionMap. Format: projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map} See: https://google.aip.dev/122#fields-representing-resource-names + * `producerPscConfigs` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.ProducerPscConfig.t)`, *default:* `nil`) - The PSC configurations on producer side. + * `serviceClass` (*type:* `String.t`, *default:* `nil`) - The service class identifier this ServiceConnectionMap is for. The user of ServiceConnectionMap create API needs to have networkconnecitivty.serviceclasses.use iam permission for the service class. + * `serviceClassUri` (*type:* `String.t`, *default:* `nil`) - Output only. The service class uri this ServiceConnectionMap is for. + * `token` (*type:* `String.t`, *default:* `nil`) - The token provided by the consumer. This token authenticates that the consumer can create a connecton within the specified project and network. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the ServiceConnectionMap was updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :consumerPscConfigs => + list(GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConfig.t()) | nil, + :consumerPscConnections => + list(GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConnection.t()) | nil, + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :etag => String.t() | nil, + :infrastructure => String.t() | nil, + :labels => map() | nil, + :name => String.t() | nil, + :producerPscConfigs => + list(GoogleApi.NetworkConnectivity.V1.Model.ProducerPscConfig.t()) | nil, + :serviceClass => String.t() | nil, + :serviceClassUri => String.t() | nil, + :token => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:consumerPscConfigs, + as: GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConfig, + type: :list + ) + + field(:consumerPscConnections, + as: GoogleApi.NetworkConnectivity.V1.Model.ConsumerPscConnection, + type: :list + ) + + field(:createTime, as: DateTime) + field(:description) + field(:etag) + field(:infrastructure) + field(:labels, type: :map) + field(:name) + + field(:producerPscConfigs, + as: GoogleApi.NetworkConnectivity.V1.Model.ProducerPscConfig, + type: :list + ) + + field(:serviceClass) + field(:serviceClassUri) + field(:token) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionMap do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_policy.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_policy.ex new file mode 100644 index 0000000000..9fe75c2233 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_policy.ex @@ -0,0 +1,76 @@ +# 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.NetworkConnectivity.V1.Model.ServiceConnectionPolicy do + @moduledoc """ + The ServiceConnectionPolicy resource. Next id: 12 + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the ServiceConnectionMap was created. + * `description` (*type:* `String.t`, *default:* `nil`) - A description of this resource. + * `etag` (*type:* `String.t`, *default:* `nil`) - Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + * `infrastructure` (*type:* `String.t`, *default:* `nil`) - Output only. The type of underlying resources used to create the connection. + * `labels` (*type:* `map()`, *default:* `nil`) - User-defined labels. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names + * `network` (*type:* `String.t`, *default:* `nil`) - The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}. + * `pscConfig` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.PscConfig.t`, *default:* `nil`) - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. + * `pscConnections` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.PscConnection.t)`, *default:* `nil`) - Output only. [Output only] Information about each Private Service Connect connection. + * `serviceClass` (*type:* `String.t`, *default:* `nil`) - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the ServiceConnectionMap was updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :etag => String.t() | nil, + :infrastructure => String.t() | nil, + :labels => map() | nil, + :name => String.t() | nil, + :network => String.t() | nil, + :pscConfig => GoogleApi.NetworkConnectivity.V1.Model.PscConfig.t() | nil, + :pscConnections => list(GoogleApi.NetworkConnectivity.V1.Model.PscConnection.t()) | nil, + :serviceClass => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:etag) + field(:infrastructure) + field(:labels, type: :map) + field(:name) + field(:network) + field(:pscConfig, as: GoogleApi.NetworkConnectivity.V1.Model.PscConfig) + field(:pscConnections, as: GoogleApi.NetworkConnectivity.V1.Model.PscConnection, type: :list) + field(:serviceClass) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionPolicy do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_token.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_token.ex new file mode 100644 index 0000000000..70e456cde7 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/service_connection_token.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.NetworkConnectivity.V1.Model.ServiceConnectionToken do + @moduledoc """ + The ServiceConnectionToken resource. Next id: 10 + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the ServiceConnectionToken was created. + * `description` (*type:* `String.t`, *default:* `nil`) - A description of this resource. + * `etag` (*type:* `String.t`, *default:* `nil`) - Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time to which this token is valid. + * `labels` (*type:* `map()`, *default:* `nil`) - User-defined labels. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of a ServiceConnectionToken. Format: projects/{project}/locations/{location}/ServiceConnectionTokens/{service_connection_token} See: https://google.aip.dev/122#fields-representing-resource-names + * `network` (*type:* `String.t`, *default:* `nil`) - The resource path of the network associated with this token. Example: projects/{projectNumOrId}/global/networks/{resourceId}. + * `token` (*type:* `String.t`, *default:* `nil`) - Output only. The token generated by Automation. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time when the ServiceConnectionToken was updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :etag => String.t() | nil, + :expireTime => DateTime.t() | nil, + :labels => map() | nil, + :name => String.t() | nil, + :network => String.t() | nil, + :token => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:etag) + field(:expireTime, as: DateTime) + field(:labels, type: :map) + field(:name) + field(:network) + field(:token) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.ServiceConnectionToken do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke.ex index 4d06d8e159..86a1bd42d2 100644 --- a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke.ex +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke.ex @@ -17,20 +17,24 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Spoke do @moduledoc """ - A Network Connectivity Center spoke represents a connection between your Google Cloud network resources and a non-Google-Cloud network. When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels * linked_interconnect_attachments * linked_router_appliance_instances + A Network Connectivity Center spoke represents one or more network connectivity resources. When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels * linked_interconnect_attachments * linked_router_appliance_instances * linked_vpc_network ## Attributes * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the spoke was created. * `description` (*type:* `String.t`, *default:* `nil`) - An optional description of the spoke. + * `group` (*type:* `String.t`, *default:* `nil`) - Optional. The name of the group that this spoke is associated with. * `hub` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the hub that this spoke is attached to. - * `labels` (*type:* `map()`, *default:* `nil`) - Optional labels in key:value format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * `labels` (*type:* `map()`, *default:* `nil`) - Optional labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). * `linkedInterconnectAttachments` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.LinkedInterconnectAttachments.t`, *default:* `nil`) - VLAN attachments that are associated with the spoke. * `linkedRouterApplianceInstances` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.LinkedRouterApplianceInstances.t`, *default:* `nil`) - Router appliance instances that are associated with the spoke. + * `linkedVpcNetwork` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.LinkedVpcNetwork.t`, *default:* `nil`) - Optional. VPC network that is associated with the spoke. * `linkedVpnTunnels` (*type:* `GoogleApi.NetworkConnectivity.V1.Model.LinkedVpnTunnels.t`, *default:* `nil`) - VPN tunnels that are associated with the spoke. * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the spoke. Spoke names must be unique. They use the following form: `projects/{project_number}/locations/{region}/spokes/{spoke_id}` + * `reasons` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.StateReason.t)`, *default:* `nil`) - Output only. The reasons for current state of the spoke. Only present when the spoke is in the `INACTIVE` state. + * `spokeType` (*type:* `String.t`, *default:* `nil`) - Output only. The type of resource associated with the spoke. * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current lifecycle state of this spoke. - * `uniqueId` (*type:* `String.t`, *default:* `nil`) - Output only. The Google-generated UUID for the spoke. This value is unique across all spoke resources. If a spoke is deleted and another with the same name is created, the new spoke is assigned a different unique_id. + * `uniqueId` (*type:* `String.t`, *default:* `nil`) - Output only. The Google-generated UUID for the spoke. This value is unique across all spoke resources. If a spoke is deleted and another with the same name is created, the new spoke is assigned a different `unique_id`. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the spoke was last updated. """ @@ -39,14 +43,18 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Spoke do @type t :: %__MODULE__{ :createTime => DateTime.t() | nil, :description => String.t() | nil, + :group => String.t() | nil, :hub => String.t() | nil, :labels => map() | nil, :linkedInterconnectAttachments => GoogleApi.NetworkConnectivity.V1.Model.LinkedInterconnectAttachments.t() | nil, :linkedRouterApplianceInstances => GoogleApi.NetworkConnectivity.V1.Model.LinkedRouterApplianceInstances.t() | nil, + :linkedVpcNetwork => GoogleApi.NetworkConnectivity.V1.Model.LinkedVpcNetwork.t() | nil, :linkedVpnTunnels => GoogleApi.NetworkConnectivity.V1.Model.LinkedVpnTunnels.t() | nil, :name => String.t() | nil, + :reasons => list(GoogleApi.NetworkConnectivity.V1.Model.StateReason.t()) | nil, + :spokeType => String.t() | nil, :state => String.t() | nil, :uniqueId => String.t() | nil, :updateTime => DateTime.t() | nil @@ -54,6 +62,7 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Spoke do field(:createTime, as: DateTime) field(:description) + field(:group) field(:hub) field(:labels, type: :map) @@ -65,8 +74,11 @@ defmodule GoogleApi.NetworkConnectivity.V1.Model.Spoke do as: GoogleApi.NetworkConnectivity.V1.Model.LinkedRouterApplianceInstances ) + field(:linkedVpcNetwork, as: GoogleApi.NetworkConnectivity.V1.Model.LinkedVpcNetwork) field(:linkedVpnTunnels, as: GoogleApi.NetworkConnectivity.V1.Model.LinkedVpnTunnels) field(:name) + field(:reasons, as: GoogleApi.NetworkConnectivity.V1.Model.StateReason, type: :list) + field(:spokeType) field(:state) field(:uniqueId) field(:updateTime, as: DateTime) diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_state_count.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_state_count.ex new file mode 100644 index 0000000000..9e921ce1c8 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_state_count.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.NetworkConnectivity.V1.Model.SpokeStateCount do + @moduledoc """ + The number of spokes that are in a particular state and associated with a given hub. + + ## Attributes + + * `count` (*type:* `String.t`, *default:* `nil`) - Output only. The total number of spokes that are in this state and associated with a given hub. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the spokes. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :count => String.t() | nil, + :state => String.t() | nil + } + + field(:count) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.SpokeStateCount do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.SpokeStateCount.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.SpokeStateCount do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_state_reason_count.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_state_reason_count.ex new file mode 100644 index 0000000000..71e350fb18 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_state_reason_count.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.NetworkConnectivity.V1.Model.SpokeStateReasonCount do + @moduledoc """ + The number of spokes in the hub that are inactive for this reason. + + ## Attributes + + * `count` (*type:* `String.t`, *default:* `nil`) - Output only. The total number of spokes that are inactive for a particular reason and associated with a given hub. + * `stateReasonCode` (*type:* `String.t`, *default:* `nil`) - Output only. The reason that a spoke is inactive. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :count => String.t() | nil, + :stateReasonCode => String.t() | nil + } + + field(:count) + field(:stateReasonCode) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.SpokeStateReasonCount do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.SpokeStateReasonCount.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.SpokeStateReasonCount do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_summary.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_summary.ex new file mode 100644 index 0000000000..0bfc5657cd --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_summary.ex @@ -0,0 +1,60 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.NetworkConnectivity.V1.Model.SpokeSummary do + @moduledoc """ + Summarizes information about the spokes associated with a hub. The summary includes a count of spokes according to type and according to state. If any spokes are inactive, the summary also lists the reasons they are inactive, including a count for each reason. + + ## Attributes + + * `spokeStateCounts` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.SpokeStateCount.t)`, *default:* `nil`) - Output only. Counts the number of spokes that are in each state and associated with a given hub. + * `spokeStateReasonCounts` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.SpokeStateReasonCount.t)`, *default:* `nil`) - Output only. Counts the number of spokes that are inactive for each possible reason and associated with a given hub. + * `spokeTypeCounts` (*type:* `list(GoogleApi.NetworkConnectivity.V1.Model.SpokeTypeCount.t)`, *default:* `nil`) - Output only. Counts the number of spokes of each type that are associated with a specific hub. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :spokeStateCounts => + list(GoogleApi.NetworkConnectivity.V1.Model.SpokeStateCount.t()) | nil, + :spokeStateReasonCounts => + list(GoogleApi.NetworkConnectivity.V1.Model.SpokeStateReasonCount.t()) | nil, + :spokeTypeCounts => + list(GoogleApi.NetworkConnectivity.V1.Model.SpokeTypeCount.t()) | nil + } + + field(:spokeStateCounts, as: GoogleApi.NetworkConnectivity.V1.Model.SpokeStateCount, type: :list) + + field(:spokeStateReasonCounts, + as: GoogleApi.NetworkConnectivity.V1.Model.SpokeStateReasonCount, + type: :list + ) + + field(:spokeTypeCounts, as: GoogleApi.NetworkConnectivity.V1.Model.SpokeTypeCount, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.SpokeSummary do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.SpokeSummary.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.SpokeSummary do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_type_count.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_type_count.ex new file mode 100644 index 0000000000..7fac2396b6 --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/spoke_type_count.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.NetworkConnectivity.V1.Model.SpokeTypeCount do + @moduledoc """ + The number of spokes of a given type that are associated with a specific hub. The type indicates what kind of resource is associated with the spoke. + + ## Attributes + + * `count` (*type:* `String.t`, *default:* `nil`) - Output only. The total number of spokes of this type that are associated with the hub. + * `spokeType` (*type:* `String.t`, *default:* `nil`) - Output only. The type of the spokes. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :count => String.t() | nil, + :spokeType => String.t() | nil + } + + field(:count) + field(:spokeType) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.SpokeTypeCount do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.SpokeTypeCount.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.SpokeTypeCount do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/state_reason.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/state_reason.ex new file mode 100644 index 0000000000..ede249b9ff --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/state_reason.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.NetworkConnectivity.V1.Model.StateReason do + @moduledoc """ + The reason a spoke is inactive. + + ## Attributes + + * `code` (*type:* `String.t`, *default:* `nil`) - The code associated with this reason. + * `message` (*type:* `String.t`, *default:* `nil`) - Human-readable details about this reason. + * `userDetails` (*type:* `String.t`, *default:* `nil`) - Additional information provided by the user in the RejectSpoke call. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :code => String.t() | nil, + :message => String.t() | nil, + :userDetails => String.t() | nil + } + + field(:code) + field(:message) + field(:userDetails) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.StateReason do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.StateReason.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.StateReason do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/virtual_machine.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/virtual_machine.ex new file mode 100644 index 0000000000..5c0d19bf1e --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/virtual_machine.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.NetworkConnectivity.V1.Model.VirtualMachine do + @moduledoc """ + VM instances to which this policy-based route applies to. + + ## Attributes + + * `tags` (*type:* `list(String.t)`, *default:* `nil`) - Optional. A list of VM instance tags the this policy-based route applies to. VM instances that have ANY of tags specified here will install this PBR. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :tags => list(String.t()) | nil + } + + field(:tags, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.VirtualMachine do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.VirtualMachine.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.VirtualMachine do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/warnings.ex b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/warnings.ex new file mode 100644 index 0000000000..1b31357acd --- /dev/null +++ b/clients/network_connectivity/lib/google_api/network_connectivity/v1/model/warnings.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.NetworkConnectivity.V1.Model.Warnings do + @moduledoc """ + Informational warning message. + + ## Attributes + + * `code` (*type:* `String.t`, *default:* `nil`) - Output only. A warning code, if applicable. + * `data` (*type:* `map()`, *default:* `nil`) - Output only. Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement. + * `warningMessage` (*type:* `String.t`, *default:* `nil`) - Output only. A human-readable description of the warning code. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :code => String.t() | nil, + :data => map() | nil, + :warningMessage => String.t() | nil + } + + field(:code) + field(:data, type: :map) + field(:warningMessage) +end + +defimpl Poison.Decoder, for: GoogleApi.NetworkConnectivity.V1.Model.Warnings do + def decode(value, options) do + GoogleApi.NetworkConnectivity.V1.Model.Warnings.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.NetworkConnectivity.V1.Model.Warnings do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end