Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of AndroidDeviceProvisioning client #10814

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,81 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Api.Partners do
|> Response.decode(opts ++ [struct: %GoogleApi.AndroidDeviceProvisioning.V1.Model.Device{}])
end

@doc """
Gets a device's SIM lock state.

## Parameters

* `connection` (*type:* `GoogleApi.AndroidDeviceProvisioning.V1.Connection.t`) - Connection to server
* `partner_id` (*type:* `String.t`) - Required. The ID of the partner.
* `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.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateResponse{}}` on success
* `{:error, info}` on failure
"""
@spec androiddeviceprovisioning_partners_devices_get_sim_lock_state(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateResponse.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def androiddeviceprovisioning_partners_devices_get_sim_lock_state(
connection,
partner_id,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:body => :body
}

request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/partners/{+partnerId}/devices:getSimLockState", %{
"partnerId" => URI.encode(partner_id, &URI.char_unreserved?/1)
})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(
opts ++
[struct: %GoogleApi.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateResponse{}]
)
end

@doc """
Updates reseller metadata associated with the device. Android devices only.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1 do
API client metadata for GoogleApi.AndroidDeviceProvisioning.V1.
"""

@discovery_revision "20221031"
@discovery_revision "20240310"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.ClaimDeviceRequest do

## Attributes

* `configurationId` (*type:* `String.t`, *default:* `nil`) - Optional. The ID of the configuration applied to the device section.
* `customerId` (*type:* `String.t`, *default:* `nil`) - The ID of the customer for whom the device is being claimed.
* `deviceIdentifier` (*type:* `GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier.t`, *default:* `nil`) - Required. Required. The device identifier of the device to claim.
* `deviceMetadata` (*type:* `GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceMetadata.t`, *default:* `nil`) - Optional. The metadata to attach to the device.
* `googleWorkspaceCustomerId` (*type:* `String.t`, *default:* `nil`) - The Google Workspace customer ID.
* `preProvisioningToken` (*type:* `String.t`, *default:* `nil`) - Optional. Must and can only be set for Chrome OS devices.
* `sectionType` (*type:* `String.t`, *default:* `nil`) - Required. The section type of the device's provisioning record.
* `simlockProfileId` (*type:* `String.t`, *default:* `nil`) - Optional. Must and can only be set when DeviceProvisioningSectionType is SECTION_TYPE_SIM_LOCK. The unique identifier of the SimLock profile (go/simlock/profiles).
* `simlockProfileId` (*type:* `String.t`, *default:* `nil`) - Optional. Must and can only be set when DeviceProvisioningSectionType is SECTION_TYPE_SIM_LOCK. The unique identifier of the SimLock profile.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:configurationId => String.t() | nil,
:customerId => String.t() | nil,
:deviceIdentifier =>
GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier.t() | nil,
Expand All @@ -44,6 +46,7 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.ClaimDeviceRequest do
:simlockProfileId => String.t() | nil
}

field(:configurationId)
field(:customerId)
field(:deviceIdentifier, as: GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier)
field(:deviceMetadata, as: GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.Configuration do
* `customMessage` (*type:* `String.t`, *default:* `nil`) - A message, containing one or two sentences, to help device users get help or give them more details about what’s happening to their device. Zero-touch enrollment shows this message before the device is provisioned.
* `dpcExtras` (*type:* `String.t`, *default:* `nil`) - The JSON-formatted EMM provisioning extras that are passed to the DPC.
* `dpcResourcePath` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the selected DPC (device policy controller) in the format `customers/[CUSTOMER_ID]/dpcs/*`. To list the supported DPCs, call `customers.dpcs.list`.
* `forcedResetTime` (*type:* `String.t`, *default:* `nil`) - Optional. The timeout before forcing factory reset the device if the device doesn't go through provisioning in the setup wizard, usually due to lack of network connectivity during setup wizard. Ranges from 0-6 hours, with 2 hours being the default if unset.
* `isDefault` (*type:* `boolean()`, *default:* `nil`) - Required. Whether this is the default configuration that zero-touch enrollment applies to any new devices the organization purchases in the future. Only one customer configuration can be the default. Setting this value to `true`, changes the previous default configuration's `isDefault` value to `false`.
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. The API resource name in the format `customers/[CUSTOMER_ID]/configurations/[CONFIGURATION_ID]`. Assigned by the server.
"""
Expand All @@ -44,6 +45,7 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.Configuration do
:customMessage => String.t() | nil,
:dpcExtras => String.t() | nil,
:dpcResourcePath => String.t() | nil,
:forcedResetTime => String.t() | nil,
:isDefault => boolean() | nil,
:name => String.t() | nil
}
Expand All @@ -56,6 +58,7 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.Configuration do
field(:customMessage)
field(:dpcExtras)
field(:dpcResourcePath)
field(:forcedResetTime)
field(:isDefault)
field(:name)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceClaim do

* `additionalService` (*type:* `String.t`, *default:* `nil`) - The Additional service registered for the device.
* `googleWorkspaceCustomerId` (*type:* `String.t`, *default:* `nil`) - The ID of the Google Workspace account that owns the Chrome OS device.
* `ownerCompanyId` (*type:* `String.t`, *default:* `nil`) - The ID of the Customer that purchased the Android device.
* `ownerCompanyId` (*type:* `String.t`, *default:* `nil`) - The ID of the Customer that purchased the device.
* `resellerId` (*type:* `String.t`, *default:* `nil`) - The ID of the reseller that claimed the device.
* `sectionType` (*type:* `String.t`, *default:* `nil`) - Output only. The type of claim made on the device.
* `vacationModeExpireTime` (*type:* `DateTime.t`, *default:* `nil`) - The timestamp when the device will exit ‘vacation mode’. This value is present iff the device is in 'vacation mode'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier do
* `imei` (*type:* `String.t`, *default:* `nil`) - The device’s IMEI number. Validated on input.
* `manufacturer` (*type:* `String.t`, *default:* `nil`) - The device manufacturer’s name. Matches the device's built-in value returned from `android.os.Build.MANUFACTURER`. Allowed values are listed in [Android manufacturers](/zero-touch/resources/manufacturer-names#manufacturers-names).
* `meid` (*type:* `String.t`, *default:* `nil`) - The device’s MEID number.
* `model` (*type:* `String.t`, *default:* `nil`) - The device model's name. Allowed values are listed in [Android models](/zero-touch/resources/manufacturer-names#model-names) and [Chrome OS models](https://support.google.com/chrome/a/answer/10130175?hl=en#identify_compatible).
* `model` (*type:* `String.t`, *default:* `nil`) - The device model's name. Allowed values are listed in [Android models](/zero-touch/resources/manufacturer-names#model-names) and [Chrome OS models](https://support.google.com/chrome/a/answer/10130175#identify_compatible).
* `serialNumber` (*type:* `String.t`, *default:* `nil`) - The manufacturer's serial number for the device. This value might not be unique across different device models.
"""

Expand Down
Original file line number Diff line number Diff line change
@@ -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.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateRequest do
@moduledoc """
Request to get a device's SIM lock status.

## Attributes

* `deviceIdentifier` (*type:* `GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier.t`, *default:* `nil`) - Required. Required. The device identifier to search for.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:deviceIdentifier =>
GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier.t() | nil
}

field(:deviceIdentifier, as: GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier)
end

defimpl Poison.Decoder,
for: GoogleApi.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateRequest do
def decode(value, options) do
GoogleApi.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateRequest.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateRequest do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateResponse do
@moduledoc """
Response containing a device's SimLock state.

## Attributes

* `simLockState` (*type:* `String.t`, *default:* `nil`) -
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:simLockState => String.t() | nil
}

field(:simLockState)
end

defimpl Poison.Decoder,
for: GoogleApi.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateResponse do
def decode(value, options) do
GoogleApi.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateResponse.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.AndroidDeviceProvisioning.V1.Model.GetDeviceSimLockStateResponse do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,39 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.PartnerClaim do

## Attributes

* `configurationId` (*type:* `String.t`, *default:* `nil`) - Optional. The ID of the configuration applied to the device section.
* `customerId` (*type:* `String.t`, *default:* `nil`) - The ID of the customer for whom the device is being claimed.
* `deviceIdentifier` (*type:* `GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier.t`, *default:* `nil`) - Required. Required. Device identifier of the device.
* `deviceMetadata` (*type:* `GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceMetadata.t`, *default:* `nil`) - Required. The metadata to attach to the device at claim.
* `googleWorkspaceCustomerId` (*type:* `String.t`, *default:* `nil`) - The Google Workspace customer ID.
* `preProvisioningToken` (*type:* `String.t`, *default:* `nil`) - Optional. Must and can only be set for Chrome OS devices.
* `sectionType` (*type:* `String.t`, *default:* `nil`) - Required. The section type of the device's provisioning record.
* `simlockProfileId` (*type:* `String.t`, *default:* `nil`) - Optional. Must and can only be set when DeviceProvisioningSectionType is SECTION_TYPE_SIM_LOCK. The unique identifier of the SimLock profile.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:configurationId => String.t() | nil,
:customerId => String.t() | nil,
:deviceIdentifier =>
GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier.t() | nil,
:deviceMetadata =>
GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceMetadata.t() | nil,
:googleWorkspaceCustomerId => String.t() | nil,
:preProvisioningToken => String.t() | nil,
:sectionType => String.t() | nil
:sectionType => String.t() | nil,
:simlockProfileId => String.t() | nil
}

field(:configurationId)
field(:customerId)
field(:deviceIdentifier, as: GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceIdentifier)
field(:deviceMetadata, as: GoogleApi.AndroidDeviceProvisioning.V1.Model.DeviceMetadata)
field(:googleWorkspaceCustomerId)
field(:preProvisioningToken)
field(:sectionType)
field(:simlockProfileId)
end

defimpl Poison.Decoder, for: GoogleApi.AndroidDeviceProvisioning.V1.Model.PartnerClaim do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.PerDeviceStatusInBatch do

## Attributes

* `deviceId` (*type:* `String.t`, *default:* `nil`) - If processing succeeds, the device ID of the Android device.
* `deviceId` (*type:* `String.t`, *default:* `nil`) - If processing succeeds, the device ID of the device.
* `errorIdentifier` (*type:* `String.t`, *default:* `nil`) - If processing fails, the error type.
* `errorMessage` (*type:* `String.t`, *default:* `nil`) - If processing fails, a developer message explaining what went wrong.
* `status` (*type:* `String.t`, *default:* `nil`) - The result status of the device after processing.
Expand Down
Loading