-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Automated regeneration of AccessContextManager client (#10879)
Auto-created at 2024-03-12 01:31:24 +0000 using the toys pull request generator.
- Loading branch information
1 parent
dd9cfd3
commit 1f2f061
Showing
28 changed files
with
933 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
368 changes: 366 additions & 2 deletions
368
...ts/access_context_manager/lib/google_api/access_context_manager/v1/api/access_policies.ex
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
152 changes: 152 additions & 0 deletions
152
clients/access_context_manager/lib/google_api/access_context_manager/v1/api/services.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
# 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.AccessContextManager.V1.Api.Services do | ||
@moduledoc """ | ||
API calls for all endpoints tagged `Services`. | ||
""" | ||
|
||
alias GoogleApi.AccessContextManager.V1.Connection | ||
alias GoogleApi.Gax.{Request, Response} | ||
|
||
@library_version Mix.Project.config() |> Keyword.get(:version, "") | ||
|
||
@doc """ | ||
Returns a VPC-SC supported service based on the service name. | ||
## Parameters | ||
* `connection` (*type:* `GoogleApi.AccessContextManager.V1.Connection.t`) - Connection to server | ||
* `name` (*type:* `String.t`) - The name of the service to get information about. The names must be in the same format as used in defining a service perimeter, for example, `storage.googleapis.com`. | ||
* `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.AccessContextManager.V1.Model.SupportedService{}}` on success | ||
* `{:error, info}` on failure | ||
""" | ||
@spec accesscontextmanager_services_get(Tesla.Env.client(), String.t(), keyword(), keyword()) :: | ||
{:ok, GoogleApi.AccessContextManager.V1.Model.SupportedService.t()} | ||
| {:ok, Tesla.Env.t()} | ||
| {:ok, list()} | ||
| {:error, any()} | ||
def accesscontextmanager_services_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/services/{name}", %{ | ||
"name" => URI.encode(name, &(URI.char_unreserved?(&1) || &1 == ?/)) | ||
}) | ||
|> Request.add_optional_params(optional_params_config, optional_params) | ||
|> Request.library_version(@library_version) | ||
|
||
connection | ||
|> Connection.execute(request) | ||
|> Response.decode( | ||
opts ++ [struct: %GoogleApi.AccessContextManager.V1.Model.SupportedService{}] | ||
) | ||
end | ||
|
||
@doc """ | ||
Lists all VPC-SC supported services. | ||
## Parameters | ||
* `connection` (*type:* `GoogleApi.AccessContextManager.V1.Connection.t`) - Connection to server | ||
* `optional_params` (*type:* `keyword()`) - Optional parameters | ||
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format. | ||
* `:access_token` (*type:* `String.t`) - OAuth access token. | ||
* `:alt` (*type:* `String.t`) - Data format for response. | ||
* `:callback` (*type:* `String.t`) - JSONP | ||
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. | ||
* `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. | ||
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. | ||
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. | ||
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. | ||
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). | ||
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). | ||
* `:pageSize` (*type:* `integer()`) - This flag specifies the maximum number of services to return per page. Default is 100. | ||
* `:pageToken` (*type:* `String.t`) - Token to start on a later page. Default is the first page. | ||
* `opts` (*type:* `keyword()`) - Call options | ||
## Returns | ||
* `{:ok, %GoogleApi.AccessContextManager.V1.Model.ListSupportedServicesResponse{}}` on success | ||
* `{:error, info}` on failure | ||
""" | ||
@spec accesscontextmanager_services_list(Tesla.Env.client(), keyword(), keyword()) :: | ||
{:ok, GoogleApi.AccessContextManager.V1.Model.ListSupportedServicesResponse.t()} | ||
| {:ok, Tesla.Env.t()} | ||
| {:ok, list()} | ||
| {:error, any()} | ||
def accesscontextmanager_services_list(connection, optional_params \\ [], opts \\ []) do | ||
optional_params_config = %{ | ||
:"$.xgafv" => :query, | ||
:access_token => :query, | ||
:alt => :query, | ||
:callback => :query, | ||
:fields => :query, | ||
:key => :query, | ||
:oauth_token => :query, | ||
:prettyPrint => :query, | ||
:quotaUser => :query, | ||
:uploadType => :query, | ||
:upload_protocol => :query, | ||
:pageSize => :query, | ||
:pageToken => :query | ||
} | ||
|
||
request = | ||
Request.new() | ||
|> Request.method(:get) | ||
|> Request.url("/v1/services", %{}) | ||
|> Request.add_optional_params(optional_params_config, optional_params) | ||
|> Request.library_version(@library_version) | ||
|
||
connection | ||
|> Connection.execute(request) | ||
|> Response.decode( | ||
opts ++ [struct: %GoogleApi.AccessContextManager.V1.Model.ListSupportedServicesResponse{}] | ||
) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...ss_context_manager/lib/google_api/access_context_manager/v1/model/authorized_orgs_desc.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.AccessContextManager.V1.Model.AuthorizedOrgsDesc do | ||
@moduledoc """ | ||
`AuthorizedOrgsDesc` contains data for an organization's authorization policy. | ||
## Attributes | ||
* `assetType` (*type:* `String.t`, *default:* `nil`) - The asset type of this authorized orgs desc. Valid values are `ASSET_TYPE_DEVICE`, and `ASSET_TYPE_CREDENTIAL_STRENGTH`. | ||
* `authorizationDirection` (*type:* `String.t`, *default:* `nil`) - The direction of the authorization relationship between this organization and the organizations listed in the `orgs` field. The valid values for this field include the following: `AUTHORIZATION_DIRECTION_FROM`: Allows this organization to evaluate traffic in the organizations listed in the `orgs` field. `AUTHORIZATION_DIRECTION_TO`: Allows the organizations listed in the `orgs` field to evaluate the traffic in this organization. For the authorization relationship to take effect, all of the organizations must authorize and specify the appropriate relationship direction. For example, if organization A authorized organization B and C to evaluate its traffic, by specifying `AUTHORIZATION_DIRECTION_TO` as the authorization direction, organizations B and C must specify `AUTHORIZATION_DIRECTION_FROM` as the authorization direction in their `AuthorizedOrgsDesc` resource. | ||
* `authorizationType` (*type:* `String.t`, *default:* `nil`) - A granular control type for authorization levels. Valid value is `AUTHORIZATION_TYPE_TRUST`. | ||
* `name` (*type:* `String.t`, *default:* `nil`) - Resource name for the `AuthorizedOrgsDesc`. Format: `accessPolicies/{access_policy}/authorizedOrgsDescs/{authorized_orgs_desc}`. The `authorized_orgs_desc` component must begin with a letter, followed by alphanumeric characters or `_`. After you create an `AuthorizedOrgsDesc`, you cannot change its `name`. | ||
* `orgs` (*type:* `list(String.t)`, *default:* `nil`) - The list of organization ids in this AuthorizedOrgsDesc. Format: `organizations/` Example: `organizations/123456` | ||
""" | ||
|
||
use GoogleApi.Gax.ModelBase | ||
|
||
@type t :: %__MODULE__{ | ||
:assetType => String.t() | nil, | ||
:authorizationDirection => String.t() | nil, | ||
:authorizationType => String.t() | nil, | ||
:name => String.t() | nil, | ||
:orgs => list(String.t()) | nil | ||
} | ||
|
||
field(:assetType) | ||
field(:authorizationDirection) | ||
field(:authorizationType) | ||
field(:name) | ||
field(:orgs, type: :list) | ||
end | ||
|
||
defimpl Poison.Decoder, for: GoogleApi.AccessContextManager.V1.Model.AuthorizedOrgsDesc do | ||
def decode(value, options) do | ||
GoogleApi.AccessContextManager.V1.Model.AuthorizedOrgsDesc.decode(value, options) | ||
end | ||
end | ||
|
||
defimpl Poison.Encoder, for: GoogleApi.AccessContextManager.V1.Model.AuthorizedOrgsDesc do | ||
def encode(value, options) do | ||
GoogleApi.Gax.ModelBase.encode(value, options) | ||
end | ||
end |
Oops, something went wrong.