Skip to content

Commit 6911a3e

Browse files
feat: Automated regeneration of CloudControlsPartner client (googleapis#12414)
Auto-created at 2024-10-26 13:13:00 +0000 using the toys pull request generator.
1 parent b138b02 commit 6911a3e

File tree

6 files changed

+266
-4
lines changed

6 files changed

+266
-4
lines changed

clients/cloud_controls_partner/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_cloud_controls_partner, "~> 0.3"}]
14+
[{:google_api_cloud_controls_partner, "~> 0.4"}]
1515
end
1616
```
1717

clients/cloud_controls_partner/lib/google_api/cloud_controls_partner/v1/api/organizations.ex

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,150 @@ defmodule GoogleApi.CloudControlsPartner.V1.Api.Organizations do
9595
|> Response.decode(opts ++ [struct: %GoogleApi.CloudControlsPartner.V1.Model.Partner{}])
9696
end
9797

98+
@doc """
99+
Creates a new customer.
100+
101+
## Parameters
102+
103+
* `connection` (*type:* `GoogleApi.CloudControlsPartner.V1.Connection.t`) - Connection to server
104+
* `parent` (*type:* `String.t`) - Required. Parent resource Format: `organizations/{organization}/locations/{location}`
105+
* `optional_params` (*type:* `keyword()`) - Optional parameters
106+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
107+
* `:access_token` (*type:* `String.t`) - OAuth access token.
108+
* `:alt` (*type:* `String.t`) - Data format for response.
109+
* `:callback` (*type:* `String.t`) - JSONP
110+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
111+
* `: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.
112+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
113+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
114+
* `: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.
115+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
116+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
117+
* `:customerId` (*type:* `String.t`) - Required. The customer id to use for the customer, which will become the final component of the customer's resource name. The specified value must be a valid Google cloud organization id.
118+
* `:body` (*type:* `GoogleApi.CloudControlsPartner.V1.Model.Customer.t`) -
119+
* `opts` (*type:* `keyword()`) - Call options
120+
121+
## Returns
122+
123+
* `{:ok, %GoogleApi.CloudControlsPartner.V1.Model.Customer{}}` on success
124+
* `{:error, info}` on failure
125+
"""
126+
@spec cloudcontrolspartner_organizations_locations_customers_create(
127+
Tesla.Env.client(),
128+
String.t(),
129+
keyword(),
130+
keyword()
131+
) ::
132+
{:ok, GoogleApi.CloudControlsPartner.V1.Model.Customer.t()}
133+
| {:ok, Tesla.Env.t()}
134+
| {:ok, list()}
135+
| {:error, any()}
136+
def cloudcontrolspartner_organizations_locations_customers_create(
137+
connection,
138+
parent,
139+
optional_params \\ [],
140+
opts \\ []
141+
) do
142+
optional_params_config = %{
143+
:"$.xgafv" => :query,
144+
:access_token => :query,
145+
:alt => :query,
146+
:callback => :query,
147+
:fields => :query,
148+
:key => :query,
149+
:oauth_token => :query,
150+
:prettyPrint => :query,
151+
:quotaUser => :query,
152+
:uploadType => :query,
153+
:upload_protocol => :query,
154+
:customerId => :query,
155+
:body => :body
156+
}
157+
158+
request =
159+
Request.new()
160+
|> Request.method(:post)
161+
|> Request.url("/v1/{+parent}/customers", %{
162+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
163+
})
164+
|> Request.add_optional_params(optional_params_config, optional_params)
165+
|> Request.library_version(@library_version)
166+
167+
connection
168+
|> Connection.execute(request)
169+
|> Response.decode(opts ++ [struct: %GoogleApi.CloudControlsPartner.V1.Model.Customer{}])
170+
end
171+
172+
@doc """
173+
Delete details of a single customer
174+
175+
## Parameters
176+
177+
* `connection` (*type:* `GoogleApi.CloudControlsPartner.V1.Connection.t`) - Connection to server
178+
* `name` (*type:* `String.t`) - Required. name of the resource to be deleted format: name=organizations/*/locations/*/customers/*
179+
* `optional_params` (*type:* `keyword()`) - Optional parameters
180+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
181+
* `:access_token` (*type:* `String.t`) - OAuth access token.
182+
* `:alt` (*type:* `String.t`) - Data format for response.
183+
* `:callback` (*type:* `String.t`) - JSONP
184+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
185+
* `: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.
186+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
187+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
188+
* `: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.
189+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
190+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
191+
* `opts` (*type:* `keyword()`) - Call options
192+
193+
## Returns
194+
195+
* `{:ok, %GoogleApi.CloudControlsPartner.V1.Model.Empty{}}` on success
196+
* `{:error, info}` on failure
197+
"""
198+
@spec cloudcontrolspartner_organizations_locations_customers_delete(
199+
Tesla.Env.client(),
200+
String.t(),
201+
keyword(),
202+
keyword()
203+
) ::
204+
{:ok, GoogleApi.CloudControlsPartner.V1.Model.Empty.t()}
205+
| {:ok, Tesla.Env.t()}
206+
| {:ok, list()}
207+
| {:error, any()}
208+
def cloudcontrolspartner_organizations_locations_customers_delete(
209+
connection,
210+
name,
211+
optional_params \\ [],
212+
opts \\ []
213+
) do
214+
optional_params_config = %{
215+
:"$.xgafv" => :query,
216+
:access_token => :query,
217+
:alt => :query,
218+
:callback => :query,
219+
:fields => :query,
220+
:key => :query,
221+
:oauth_token => :query,
222+
:prettyPrint => :query,
223+
:quotaUser => :query,
224+
:uploadType => :query,
225+
:upload_protocol => :query
226+
}
227+
228+
request =
229+
Request.new()
230+
|> Request.method(:delete)
231+
|> Request.url("/v1/{+name}", %{
232+
"name" => URI.encode(name, &URI.char_unreserved?/1)
233+
})
234+
|> Request.add_optional_params(optional_params_config, optional_params)
235+
|> Request.library_version(@library_version)
236+
237+
connection
238+
|> Connection.execute(request)
239+
|> Response.decode(opts ++ [struct: %GoogleApi.CloudControlsPartner.V1.Model.Empty{}])
240+
end
241+
98242
@doc """
99243
Gets details of a single customer
100244
@@ -245,6 +389,80 @@ defmodule GoogleApi.CloudControlsPartner.V1.Api.Organizations do
245389
)
246390
end
247391

392+
@doc """
393+
Update details of a single customer
394+
395+
## Parameters
396+
397+
* `connection` (*type:* `GoogleApi.CloudControlsPartner.V1.Connection.t`) - Connection to server
398+
* `name` (*type:* `String.t`) - Identifier. Format: `organizations/{organization}/locations/{location}/customers/{customer}`
399+
* `optional_params` (*type:* `keyword()`) - Optional parameters
400+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
401+
* `:access_token` (*type:* `String.t`) - OAuth access token.
402+
* `:alt` (*type:* `String.t`) - Data format for response.
403+
* `:callback` (*type:* `String.t`) - JSONP
404+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
405+
* `: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.
406+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
407+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
408+
* `: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.
409+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
410+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
411+
* `:updateMask` (*type:* `String.t`) - Optional. The list of fields to update
412+
* `:body` (*type:* `GoogleApi.CloudControlsPartner.V1.Model.Customer.t`) -
413+
* `opts` (*type:* `keyword()`) - Call options
414+
415+
## Returns
416+
417+
* `{:ok, %GoogleApi.CloudControlsPartner.V1.Model.Customer{}}` on success
418+
* `{:error, info}` on failure
419+
"""
420+
@spec cloudcontrolspartner_organizations_locations_customers_patch(
421+
Tesla.Env.client(),
422+
String.t(),
423+
keyword(),
424+
keyword()
425+
) ::
426+
{:ok, GoogleApi.CloudControlsPartner.V1.Model.Customer.t()}
427+
| {:ok, Tesla.Env.t()}
428+
| {:ok, list()}
429+
| {:error, any()}
430+
def cloudcontrolspartner_organizations_locations_customers_patch(
431+
connection,
432+
name,
433+
optional_params \\ [],
434+
opts \\ []
435+
) do
436+
optional_params_config = %{
437+
:"$.xgafv" => :query,
438+
:access_token => :query,
439+
:alt => :query,
440+
:callback => :query,
441+
:fields => :query,
442+
:key => :query,
443+
:oauth_token => :query,
444+
:prettyPrint => :query,
445+
:quotaUser => :query,
446+
:uploadType => :query,
447+
:upload_protocol => :query,
448+
:updateMask => :query,
449+
:body => :body
450+
}
451+
452+
request =
453+
Request.new()
454+
|> Request.method(:patch)
455+
|> Request.url("/v1/{+name}", %{
456+
"name" => URI.encode(name, &URI.char_unreserved?/1)
457+
})
458+
|> Request.add_optional_params(optional_params_config, optional_params)
459+
|> Request.library_version(@library_version)
460+
461+
connection
462+
|> Connection.execute(request)
463+
|> Response.decode(opts ++ [struct: %GoogleApi.CloudControlsPartner.V1.Model.Customer{}])
464+
end
465+
248466
@doc """
249467
Gets details of a single workload
250468

clients/cloud_controls_partner/lib/google_api/cloud_controls_partner/v1/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.CloudControlsPartner.V1 do
2020
API client metadata for GoogleApi.CloudControlsPartner.V1.
2121
"""
2222

23-
@discovery_revision "20240904"
23+
@discovery_revision "20241024"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/cloud_controls_partner/lib/google_api/cloud_controls_partner/v1/model/customer.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ defmodule GoogleApi.CloudControlsPartner.V1.Model.Customer do
2525
* `displayName` (*type:* `String.t`, *default:* `nil`) - Required. Display name for the customer
2626
* `isOnboarded` (*type:* `boolean()`, *default:* `nil`) - Output only. Indicates whether a customer is fully onboarded
2727
* `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Format: `organizations/{organization}/locations/{location}/customers/{customer}`
28+
* `organizationDomain` (*type:* `String.t`, *default:* `nil`) - Output only. The customer organization domain, extracted from CRM Organization’s display_name field. e.g. "google.com"
2829
"""
2930

3031
use GoogleApi.Gax.ModelBase
@@ -34,7 +35,8 @@ defmodule GoogleApi.CloudControlsPartner.V1.Model.Customer do
3435
GoogleApi.CloudControlsPartner.V1.Model.CustomerOnboardingState.t() | nil,
3536
:displayName => String.t() | nil,
3637
:isOnboarded => boolean() | nil,
37-
:name => String.t() | nil
38+
:name => String.t() | nil,
39+
:organizationDomain => String.t() | nil
3840
}
3941

4042
field(:customerOnboardingState,
@@ -44,6 +46,7 @@ defmodule GoogleApi.CloudControlsPartner.V1.Model.Customer do
4446
field(:displayName)
4547
field(:isOnboarded)
4648
field(:name)
49+
field(:organizationDomain)
4750
end
4851

4952
defimpl Poison.Decoder, for: GoogleApi.CloudControlsPartner.V1.Model.Customer do
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.CloudControlsPartner.V1.Model.Empty do
19+
@moduledoc """
20+
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
21+
22+
## Attributes
23+
24+
"""
25+
26+
use GoogleApi.Gax.ModelBase
27+
28+
@type t :: %__MODULE__{}
29+
end
30+
31+
defimpl Poison.Decoder, for: GoogleApi.CloudControlsPartner.V1.Model.Empty do
32+
def decode(value, options) do
33+
GoogleApi.CloudControlsPartner.V1.Model.Empty.decode(value, options)
34+
end
35+
end
36+
37+
defimpl Poison.Encoder, for: GoogleApi.CloudControlsPartner.V1.Model.Empty do
38+
def encode(value, options) do
39+
GoogleApi.Gax.ModelBase.encode(value, options)
40+
end
41+
end

clients/cloud_controls_partner/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
defmodule GoogleApi.CloudControlsPartner.Mixfile do
1919
use Mix.Project
2020

21-
@version "0.3.3"
21+
@version "0.4.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)