diff --git a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/partners.ex b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/partners.ex index 2762a8b026..11a53ccb9a 100644 --- a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/partners.ex +++ b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/api/partners.ex @@ -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. diff --git a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/metadata.ex b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/metadata.ex index b37ecc060e..265acdaff7 100644 --- a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/metadata.ex +++ b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/metadata.ex @@ -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 diff --git a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/claim_device_request.ex b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/claim_device_request.ex index 92dc6698d3..278723d488 100644 --- a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/claim_device_request.ex +++ b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/claim_device_request.ex @@ -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, @@ -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) diff --git a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/configuration.ex b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/configuration.ex index a0e8afae60..8b12b00b70 100644 --- a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/configuration.ex +++ b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/configuration.ex @@ -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. """ @@ -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 } @@ -56,6 +58,7 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.Configuration do field(:customMessage) field(:dpcExtras) field(:dpcResourcePath) + field(:forcedResetTime) field(:isDefault) field(:name) end diff --git a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device_claim.ex b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device_claim.ex index fe6fab580b..0121b2200b 100644 --- a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device_claim.ex +++ b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device_claim.ex @@ -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'. diff --git a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device_identifier.ex b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device_identifier.ex index 63eca06eea..94dee3d5e0 100644 --- a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device_identifier.ex +++ b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/device_identifier.ex @@ -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. """ diff --git a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/get_device_sim_lock_state_request.ex b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/get_device_sim_lock_state_request.ex new file mode 100644 index 0000000000..ba5d356c8a --- /dev/null +++ b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/get_device_sim_lock_state_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.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 diff --git a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/get_device_sim_lock_state_response.ex b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/get_device_sim_lock_state_response.ex new file mode 100644 index 0000000000..992e257d8b --- /dev/null +++ b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/get_device_sim_lock_state_response.ex @@ -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 diff --git a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/partner_claim.ex b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/partner_claim.ex index 4ba7a3bb75..f9ccdfe45a 100644 --- a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/partner_claim.ex +++ b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/partner_claim.ex @@ -21,17 +21,20 @@ 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, @@ -39,15 +42,18 @@ defmodule GoogleApi.AndroidDeviceProvisioning.V1.Model.PartnerClaim do 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 diff --git a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/per_device_status_in_batch.ex b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/per_device_status_in_batch.ex index 1bab7435a1..e2a71d2593 100644 --- a/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/per_device_status_in_batch.ex +++ b/clients/android_device_provisioning/lib/google_api/android_device_provisioning/v1/model/per_device_status_in_batch.ex @@ -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.