Skip to content

Commit

Permalink
feat: Automated regeneration of AndroidManagement client (#10845)
Browse files Browse the repository at this point in the history
Auto-created at 2024-03-12 01:24:58 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Mar 12, 2024
1 parent 3dcc8b5 commit 2781b8d
Show file tree
Hide file tree
Showing 36 changed files with 1,348 additions and 189 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# 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.AndroidManagement.V1.Api.ProvisioningInfo do
@moduledoc """
API calls for all endpoints tagged `ProvisioningInfo`.
"""

alias GoogleApi.AndroidManagement.V1.Connection
alias GoogleApi.Gax.{Request, Response}

@library_version Mix.Project.config() |> Keyword.get(:version, "")

@doc """
Get the device provisioning information by the identifier provided in the sign-in url.
## Parameters
* `connection` (*type:* `GoogleApi.AndroidManagement.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The identifier that Android Device Policy passes to the 3P sign-in page in the form of provisioningInfo/{provisioning_info}.
* `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.AndroidManagement.V1.Model.ProvisioningInfo{}}` on success
* `{:error, info}` on failure
"""
@spec androidmanagement_provisioning_info_get(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.AndroidManagement.V1.Model.ProvisioningInfo.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def androidmanagement_provisioning_info_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.AndroidManagement.V1.Model.ProvisioningInfo{}])
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.AndroidManagement.V1 do
API client metadata for GoogleApi.AndroidManagement.V1.
"""

@discovery_revision "20221108"
@discovery_revision "20240221"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@

defmodule GoogleApi.AndroidManagement.V1.Model.AdvancedSecurityOverrides do
@moduledoc """
Security policies set to secure values by default. To maintain the security posture of a device, we don't recommend overriding any of the default values.
Advanced security settings. In most cases, setting these is not needed.
## Attributes
* `commonCriteriaMode` (*type:* `String.t`, *default:* `nil`) - Controls Common Criteria Mode—security standards defined in the Common Criteria for Information Technology Security Evaluation (https://www.commoncriteriaportal.org/) (CC). Enabling Common Criteria Mode increases certain security components on a device, including AES-GCM encryption of Bluetooth Long Term Keys, and Wi-Fi configuration stores.Warning: Common Criteria Mode enforces a strict security model typically only required for IT products used in national security systems and other highly sensitive organizations. Standard device use may be affected. Only enabled if required.
* `developerSettings` (*type:* `String.t`, *default:* `nil`) - Controls access to developer settings: developer options and safe boot. Replaces safeBootDisabled (deprecated) and debuggingFeaturesAllowed (deprecated).
* `googlePlayProtectVerifyApps` (*type:* `String.t`, *default:* `nil`) - Whether Google Play Protect verification (https://support.google.com/accounts/answer/2812853) is enforced. Replaces ensureVerifyAppsEnabled (deprecated).
* `mtePolicy` (*type:* `String.t`, *default:* `nil`) - Optional. Controls Memory Tagging Extension (MTE) (https://source.android.com/docs/security/test/memory-safety/arm-mte) on the device. The device needs to be rebooted to apply changes to the MTE policy.
* `personalAppsThatCanReadWorkNotifications` (*type:* `list(String.t)`, *default:* `nil`) - Personal apps that can read work profile notifications using a NotificationListenerService (https://developer.android.com/reference/android/service/notification/NotificationListenerService). By default, no personal apps (aside from system apps) can read work notifications. Each value in the list must be a package name.
* `untrustedAppsPolicy` (*type:* `String.t`, *default:* `nil`) - The policy for untrusted apps (apps from unknown sources) enforced on the device. Replaces install_unknown_sources_allowed (deprecated).
"""
Expand All @@ -34,13 +35,15 @@ defmodule GoogleApi.AndroidManagement.V1.Model.AdvancedSecurityOverrides do
:commonCriteriaMode => String.t() | nil,
:developerSettings => String.t() | nil,
:googlePlayProtectVerifyApps => String.t() | nil,
:mtePolicy => String.t() | nil,
:personalAppsThatCanReadWorkNotifications => list(String.t()) | nil,
:untrustedAppsPolicy => String.t() | nil
}

field(:commonCriteriaMode)
field(:developerSettings)
field(:googlePlayProtectVerifyApps)
field(:mtePolicy)
field(:personalAppsThatCanReadWorkNotifications, type: :list)
field(:untrustedAppsPolicy)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,29 @@

defmodule GoogleApi.AndroidManagement.V1.Model.ApplicationPolicy do
@moduledoc """
Policy for an individual app.
Policy for an individual app. Note: Application availability on a given device cannot be changed using this policy if installAppsDisabled is enabled. The maximum number of applications that you can specify per policy is 3,000.
## Attributes
* `accessibleTrackIds` (*type:* `list(String.t)`, *default:* `nil`) - List of the app’s track IDs that a device belonging to the enterprise can access. If the list contains multiple track IDs, devices receive the latest version among all accessible tracks. If the list contains no track IDs, devices only have access to the app’s production track. More details about each track are available in AppTrackInfo.
* `alwaysOnVpnLockdownExemption` (*type:* `String.t`, *default:* `nil`) - Specifies whether the app is allowed networking when the VPN is not connected and alwaysOnVpnPackage.lockdownEnabled is enabled. If set to VPN_LOCKDOWN_ENFORCED, the app is not allowed networking, and if set to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only supported on devices running Android 10 and above. If this is not supported by the device, the device will contain a NonComplianceDetail with non_compliance_reason set to API_LEVEL and a fieldPath. If this is not applicable to the app, the device will contain a NonComplianceDetail with non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is set to applications[i].alwaysOnVpnLockdownExemption, where i is the index of the package in the applications policy.
* `autoUpdateMode` (*type:* `String.t`, *default:* `nil`) - Controls the auto-update mode for the app.
* `connectedWorkAndPersonalApp` (*type:* `String.t`, *default:* `nil`) - Controls whether the app can communicate with itself across a device’s work and personal profiles, subject to user consent.
* `credentialProviderPolicy` (*type:* `String.t`, *default:* `nil`) - Optional. Whether the app is allowed to act as a credential provider on Android 14 and above.
* `defaultPermissionPolicy` (*type:* `String.t`, *default:* `nil`) - The default policy for all permissions requested by the app. If specified, this overrides the policy-level default_permission_policy which applies to all apps. It does not override the permission_grants which applies to all apps.
* `delegatedScopes` (*type:* `list(String.t)`, *default:* `nil`) - The scopes delegated to the app from Android Device Policy.
* `delegatedScopes` (*type:* `list(String.t)`, *default:* `nil`) - The scopes delegated to the app from Android Device Policy. These provide additional privileges for the applications they are applied to.
* `disabled` (*type:* `boolean()`, *default:* `nil`) - Whether the app is disabled. When disabled, the app data is still preserved.
* `extensionConfig` (*type:* `GoogleApi.AndroidManagement.V1.Model.ExtensionConfig.t`, *default:* `nil`) - Configuration to enable this app as an extension app, with the capability of interacting with Android Device Policy offline.This field can be set for at most one app.
* `installConstraint` (*type:* `list(GoogleApi.AndroidManagement.V1.Model.InstallConstraint.t)`, *default:* `nil`) - Optional. The constraints for installing the app. You can specify a maximum of one InstallConstraint. Multiple constraints are rejected.
* `installPriority` (*type:* `integer()`, *default:* `nil`) - Optional. Amongst apps with installType set to: FORCE_INSTALLED PREINSTALLEDthis controls the relative priority of installation. A value of 0 (default) means this app has no priority over other apps. For values between 1 and 10,000, a lower value means a higher priority. Values outside of the range 0 to 10,000 inclusive are rejected.
* `installType` (*type:* `String.t`, *default:* `nil`) - The type of installation to perform.
* `lockTaskAllowed` (*type:* `boolean()`, *default:* `nil`) - Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType KIOSK or kioskCustomLauncherEnabled to to configure a dedicated device.
* `lockTaskAllowed` (*type:* `boolean()`, *default:* `nil`) - Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType KIOSK or kioskCustomLauncherEnabled to configure a dedicated device.
* `managedConfiguration` (*type:* `map()`, *default:* `nil`) - Managed configuration applied to the app. The format for the configuration is dictated by the ManagedProperty values supported by the app. Each field name in the managed configuration must match the key field of the ManagedProperty. The field value must be compatible with the type of the ManagedProperty: *type* *JSON value* BOOL true or false STRING string INTEGER number CHOICE string MULTISELECT array of strings HIDDEN string BUNDLE_ARRAY array of objects
* `managedConfigurationTemplate` (*type:* `GoogleApi.AndroidManagement.V1.Model.ManagedConfigurationTemplate.t`, *default:* `nil`) - The managed configurations template for the app, saved from the managed configurations iframe. This field is ignored if managed_configuration is set.
* `minimumVersionCode` (*type:* `integer()`, *default:* `nil`) - The minimum version of the app that runs on the device. If set, the device attempts to update the app to at least this version code. If the app is not up-to-date, the device will contain a NonComplianceDetail with non_compliance_reason set to APP_NOT_UPDATED. The app must already be published to Google Play with a version code greater than or equal to this value. At most 20 apps may specify a minimum version code per policy.
* `packageName` (*type:* `String.t`, *default:* `nil`) - The package name of the app. For example, com.google.android.youtube for the YouTube app.
* `permissionGrants` (*type:* `list(GoogleApi.AndroidManagement.V1.Model.PermissionGrant.t)`, *default:* `nil`) - Explicit permission grants or denials for the app. These values override the default_permission_policy and permission_grants which apply to all apps.
* `workProfileWidgets` (*type:* `String.t`, *default:* `nil`) - Specifies whether the app installed in the work profile is allowed to add widgets to the home screen.
"""

use GoogleApi.Gax.ModelBase
Expand All @@ -45,10 +49,14 @@ defmodule GoogleApi.AndroidManagement.V1.Model.ApplicationPolicy do
:alwaysOnVpnLockdownExemption => String.t() | nil,
:autoUpdateMode => String.t() | nil,
:connectedWorkAndPersonalApp => String.t() | nil,
:credentialProviderPolicy => String.t() | nil,
:defaultPermissionPolicy => String.t() | nil,
:delegatedScopes => list(String.t()) | nil,
:disabled => boolean() | nil,
:extensionConfig => GoogleApi.AndroidManagement.V1.Model.ExtensionConfig.t() | nil,
:installConstraint =>
list(GoogleApi.AndroidManagement.V1.Model.InstallConstraint.t()) | nil,
:installPriority => integer() | nil,
:installType => String.t() | nil,
:lockTaskAllowed => boolean() | nil,
:managedConfiguration => map() | nil,
Expand All @@ -57,17 +65,26 @@ defmodule GoogleApi.AndroidManagement.V1.Model.ApplicationPolicy do
:minimumVersionCode => integer() | nil,
:packageName => String.t() | nil,
:permissionGrants =>
list(GoogleApi.AndroidManagement.V1.Model.PermissionGrant.t()) | nil
list(GoogleApi.AndroidManagement.V1.Model.PermissionGrant.t()) | nil,
:workProfileWidgets => String.t() | nil
}

field(:accessibleTrackIds, type: :list)
field(:alwaysOnVpnLockdownExemption)
field(:autoUpdateMode)
field(:connectedWorkAndPersonalApp)
field(:credentialProviderPolicy)
field(:defaultPermissionPolicy)
field(:delegatedScopes, type: :list)
field(:disabled)
field(:extensionConfig, as: GoogleApi.AndroidManagement.V1.Model.ExtensionConfig)

field(:installConstraint,
as: GoogleApi.AndroidManagement.V1.Model.InstallConstraint,
type: :list
)

field(:installPriority)
field(:installType)
field(:lockTaskAllowed)
field(:managedConfiguration, type: :map)
Expand All @@ -79,6 +96,7 @@ defmodule GoogleApi.AndroidManagement.V1.Model.ApplicationPolicy do
field(:minimumVersionCode)
field(:packageName)
field(:permissionGrants, as: GoogleApi.AndroidManagement.V1.Model.PermissionGrant, type: :list)
field(:workProfileWidgets)
end

defimpl Poison.Decoder, for: GoogleApi.AndroidManagement.V1.Model.ApplicationPolicy do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ defmodule GoogleApi.AndroidManagement.V1.Model.ApplicationReport do
* `packageSha256Hash` (*type:* `String.t`, *default:* `nil`) - The SHA-256 hash of the app's APK file, which can be used to verify the app hasn't been modified. Each byte of the hash value is represented as a two-digit hexadecimal number.
* `signingKeyCertFingerprints` (*type:* `list(String.t)`, *default:* `nil`) - The SHA-1 hash of each android.content.pm.Signature (https://developer.android.com/reference/android/content/pm/Signature.html) associated with the app package. Each byte of each hash value is represented as a two-digit hexadecimal number.
* `state` (*type:* `String.t`, *default:* `nil`) - Application state.
* `userFacingType` (*type:* `String.t`, *default:* `nil`) - Whether the app is user facing.
* `versionCode` (*type:* `integer()`, *default:* `nil`) - The app version code, which can be used to determine whether one version is more recent than another.
* `versionName` (*type:* `String.t`, *default:* `nil`) - The app version as displayed to the user.
"""
Expand All @@ -46,6 +47,7 @@ defmodule GoogleApi.AndroidManagement.V1.Model.ApplicationReport do
:packageSha256Hash => String.t() | nil,
:signingKeyCertFingerprints => list(String.t()) | nil,
:state => String.t() | nil,
:userFacingType => String.t() | nil,
:versionCode => integer() | nil,
:versionName => String.t() | nil
}
Expand All @@ -59,6 +61,7 @@ defmodule GoogleApi.AndroidManagement.V1.Model.ApplicationReport do
field(:packageSha256Hash)
field(:signingKeyCertFingerprints, type: :list)
field(:state)
field(:userFacingType)
field(:versionCode)
field(:versionName)
end
Expand Down
Loading

0 comments on commit 2781b8d

Please sign in to comment.