Skip to content

Commit

Permalink
feat: Automated regeneration of Testing client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Mar 12, 2024
1 parent 9e554ee commit e4ee43f
Show file tree
Hide file tree
Showing 29 changed files with 1,031 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ defmodule GoogleApi.Testing.V1.Api.ApplicationDetailService do
* `: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").
* `:"bundleLocation.gcsPath"` (*type:* `String.t`) - A path to a file in Google Cloud Storage. Example: gs://build-app-1414623860166/app%40debug-unaligned.apk These paths are expected to be url encoded (percent encoding)
* `:body` (*type:* `GoogleApi.Testing.V1.Model.FileReference.t`) -
* `opts` (*type:* `keyword()`) - Call options
Expand Down Expand Up @@ -77,6 +78,7 @@ defmodule GoogleApi.Testing.V1.Api.ApplicationDetailService do
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:"bundleLocation.gcsPath" => :query,
:body => :body
}

Expand Down
343 changes: 341 additions & 2 deletions clients/testing/lib/google_api/testing/v1/api/projects.ex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/testing/lib/google_api/testing/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Testing.V1 do
API client metadata for GoogleApi.Testing.V1.
"""

@discovery_revision "20221108"
@discovery_revision "20240305"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ defmodule GoogleApi.Testing.V1.Model.AndroidModel do
* `lowFpsVideoRecording` (*type:* `boolean()`, *default:* `nil`) - True if and only if tests with this model are recorded by stitching together screenshots. See use_low_spec_video_recording in device config.
* `manufacturer` (*type:* `String.t`, *default:* `nil`) - The manufacturer of this device.
* `name` (*type:* `String.t`, *default:* `nil`) - The human-readable marketing name for this device model. Examples: "Nexus 5", "Galaxy S5".
* `perVersionInfo` (*type:* `list(GoogleApi.Testing.V1.Model.PerAndroidVersionInfo.t)`, *default:* `nil`) - Version-specific information of an Android model.
* `screenDensity` (*type:* `integer()`, *default:* `nil`) - Screen density in DPI. This corresponds to ro.sf.lcd_density
* `screenX` (*type:* `integer()`, *default:* `nil`) - Screen size in the horizontal (X) dimension measured in pixels.
* `screenY` (*type:* `integer()`, *default:* `nil`) - Screen size in the vertical (Y) dimension measured in pixels.
Expand All @@ -49,6 +50,7 @@ defmodule GoogleApi.Testing.V1.Model.AndroidModel do
:lowFpsVideoRecording => boolean() | nil,
:manufacturer => String.t() | nil,
:name => String.t() | nil,
:perVersionInfo => list(GoogleApi.Testing.V1.Model.PerAndroidVersionInfo.t()) | nil,
:screenDensity => integer() | nil,
:screenX => integer() | nil,
:screenY => integer() | nil,
Expand All @@ -66,6 +68,7 @@ defmodule GoogleApi.Testing.V1.Model.AndroidModel do
field(:lowFpsVideoRecording)
field(:manufacturer)
field(:name)
field(:perVersionInfo, as: GoogleApi.Testing.V1.Model.PerAndroidVersionInfo, type: :list)
field(:screenDensity)
field(:screenX)
field(:screenY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

defmodule GoogleApi.Testing.V1.Model.ApkDetail do
@moduledoc """
Android application details based on application manifest and apk archive contents.
Android application details based on application manifest and archive contents.
## Attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ defmodule GoogleApi.Testing.V1.Model.ApkManifest do
* `metadata` (*type:* `list(GoogleApi.Testing.V1.Model.Metadata.t)`, *default:* `nil`) - Meta-data tags defined in the manifest.
* `minSdkVersion` (*type:* `integer()`, *default:* `nil`) - Minimum API level required for the application to run.
* `packageName` (*type:* `String.t`, *default:* `nil`) - Full Java-style package name for this application, e.g. "com.example.foo".
* `services` (*type:* `list(GoogleApi.Testing.V1.Model.Service.t)`, *default:* `nil`) - Services contained in the tag.
* `targetSdkVersion` (*type:* `integer()`, *default:* `nil`) - Specifies the API Level on which the application is designed to run.
* `usesFeature` (*type:* `list(GoogleApi.Testing.V1.Model.UsesFeature.t)`, *default:* `nil`) - Feature usage tags defined in the manifest.
* `usesPermission` (*type:* `list(String.t)`, *default:* `nil`) - Permissions declared to be used by the application
Expand All @@ -43,6 +44,7 @@ defmodule GoogleApi.Testing.V1.Model.ApkManifest do
:metadata => list(GoogleApi.Testing.V1.Model.Metadata.t()) | nil,
:minSdkVersion => integer() | nil,
:packageName => String.t() | nil,
:services => list(GoogleApi.Testing.V1.Model.Service.t()) | nil,
:targetSdkVersion => integer() | nil,
:usesFeature => list(GoogleApi.Testing.V1.Model.UsesFeature.t()) | nil,
:usesPermission => list(String.t()) | nil,
Expand All @@ -56,6 +58,7 @@ defmodule GoogleApi.Testing.V1.Model.ApkManifest do
field(:metadata, as: GoogleApi.Testing.V1.Model.Metadata, type: :list)
field(:minSdkVersion)
field(:packageName)
field(:services, as: GoogleApi.Testing.V1.Model.Service, type: :list)
field(:targetSdkVersion)
field(:usesFeature, as: GoogleApi.Testing.V1.Model.UsesFeature, type: :list)
field(:usesPermission, type: :list)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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.Testing.V1.Model.CancelDeviceSessionRequest do
@moduledoc """
The request object for cancelling a Device Session.
## Attributes
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{}
end

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

defimpl Poison.Encoder, for: GoogleApi.Testing.V1.Model.CancelDeviceSessionRequest do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
73 changes: 73 additions & 0 deletions clients/testing/lib/google_api/testing/v1/model/device_session.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 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.Testing.V1.Model.DeviceSession do
@moduledoc """
Protobuf message describing the device message, used from several RPCs.
## Attributes
* `activeStartTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp that the session first became ACTIVE.
* `androidDevice` (*type:* `GoogleApi.Testing.V1.Model.AndroidDevice.t`, *default:* `nil`) - Required. The requested device
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time that the Session was created.
* `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. The title of the DeviceSession to be presented in the UI.
* `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.
* `inactivityTimeout` (*type:* `String.t`, *default:* `nil`) - Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
* `name` (*type:* `String.t`, *default:* `nil`) - Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}"
* `state` (*type:* `String.t`, *default:* `nil`) - Output only. Current state of the DeviceSession.
* `stateHistories` (*type:* `list(GoogleApi.Testing.V1.Model.SessionStateEvent.t)`, *default:* `nil`) - Output only. The historical state transitions of the session_state message including the current session state.
* `ttl` (*type:* `String.t`, *default:* `nil`) - Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 30 minutes.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:activeStartTime => DateTime.t() | nil,
:androidDevice => GoogleApi.Testing.V1.Model.AndroidDevice.t() | nil,
:createTime => DateTime.t() | nil,
:displayName => String.t() | nil,
:expireTime => DateTime.t() | nil,
:inactivityTimeout => String.t() | nil,
:name => String.t() | nil,
:state => String.t() | nil,
:stateHistories => list(GoogleApi.Testing.V1.Model.SessionStateEvent.t()) | nil,
:ttl => String.t() | nil
}

field(:activeStartTime, as: DateTime)
field(:androidDevice, as: GoogleApi.Testing.V1.Model.AndroidDevice)
field(:createTime, as: DateTime)
field(:displayName)
field(:expireTime, as: DateTime)
field(:inactivityTimeout)
field(:name)
field(:state)
field(:stateHistories, as: GoogleApi.Testing.V1.Model.SessionStateEvent, type: :list)
field(:ttl)
end

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

defimpl Poison.Encoder, for: GoogleApi.Testing.V1.Model.DeviceSession 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,49 @@
# 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.Testing.V1.Model.DirectAccessVersionInfo do
@moduledoc """
Denotes whether Direct Access is supported, and by which client versions. DirectAccessService is currently available as a preview to select developers. You can register today on behalf of you and your team at https://developer.android.com/studio/preview/android-device-streaming
## Attributes
* `directAccessSupported` (*type:* `boolean()`, *default:* `nil`) - Whether direct access is supported at all. Clients are expected to filter down the device list to only android models and versions which support Direct Access when that is the user intent.
* `minimumAndroidStudioVersion` (*type:* `String.t`, *default:* `nil`) - Output only. Indicates client-device compatibility, where a device is known to work only with certain workarounds implemented in the Android Studio client. Expected format "major.minor.micro.patch", e.g. "5921.22.2211.8881706".
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:directAccessSupported => boolean() | nil,
:minimumAndroidStudioVersion => String.t() | nil
}

field(:directAccessSupported)
field(:minimumAndroidStudioVersion)
end

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

defimpl Poison.Encoder, for: GoogleApi.Testing.V1.Model.DirectAccessVersionInfo do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
41 changes: 41 additions & 0 deletions clients/testing/lib/google_api/testing/v1/model/empty.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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.Testing.V1.Model.Empty do
@moduledoc """
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); }
## Attributes
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{}
end

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

defimpl Poison.Encoder, for: GoogleApi.Testing.V1.Model.Empty 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 @@ -17,11 +17,11 @@

defmodule GoogleApi.Testing.V1.Model.GetApkDetailsResponse do
@moduledoc """
Response containing the details of the specified Android application APK.
Response containing the details of the specified Android application.
## Attributes
* `apkDetail` (*type:* `GoogleApi.Testing.V1.Model.ApkDetail.t`, *default:* `nil`) - Details of the Android APK.
* `apkDetail` (*type:* `GoogleApi.Testing.V1.Model.ApkDetail.t`, *default:* `nil`) - Details of the Android App.
"""

use GoogleApi.Gax.ModelBase
Expand Down
3 changes: 3 additions & 0 deletions clients/testing/lib/google_api/testing/v1/model/ios_model.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ defmodule GoogleApi.Testing.V1.Model.IosModel do
* `formFactor` (*type:* `String.t`, *default:* `nil`) - Whether this device is a phone, tablet, wearable, etc.
* `id` (*type:* `String.t`, *default:* `nil`) - The unique opaque id for this model. Use this for invoking the TestExecutionService.
* `name` (*type:* `String.t`, *default:* `nil`) - The human-readable name for this device model. Examples: "iPhone 4s", "iPad Mini 2".
* `perVersionInfo` (*type:* `list(GoogleApi.Testing.V1.Model.PerIosVersionInfo.t)`, *default:* `nil`) - Version-specific information of an iOS model.
* `screenDensity` (*type:* `integer()`, *default:* `nil`) - Screen density in DPI.
* `screenX` (*type:* `integer()`, *default:* `nil`) - Screen size in the horizontal (X) dimension measured in pixels.
* `screenY` (*type:* `integer()`, *default:* `nil`) - Screen size in the vertical (Y) dimension measured in pixels.
Expand All @@ -39,6 +40,7 @@ defmodule GoogleApi.Testing.V1.Model.IosModel do
:formFactor => String.t() | nil,
:id => String.t() | nil,
:name => String.t() | nil,
:perVersionInfo => list(GoogleApi.Testing.V1.Model.PerIosVersionInfo.t()) | nil,
:screenDensity => integer() | nil,
:screenX => integer() | nil,
:screenY => integer() | nil,
Expand All @@ -50,6 +52,7 @@ defmodule GoogleApi.Testing.V1.Model.IosModel do
field(:formFactor)
field(:id)
field(:name)
field(:perVersionInfo, as: GoogleApi.Testing.V1.Model.PerIosVersionInfo, type: :list)
field(:screenDensity)
field(:screenX)
field(:screenY)
Expand Down
52 changes: 52 additions & 0 deletions clients/testing/lib/google_api/testing/v1/model/ios_robo_test.ex
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.Testing.V1.Model.IosRoboTest do
@moduledoc """
A test that explores an iOS application on an iOS device.
## Attributes
* `appBundleId` (*type:* `String.t`, *default:* `nil`) - The bundle ID for the app-under-test. This is determined by examining the application's "Info.plist" file.
* `appIpa` (*type:* `GoogleApi.Testing.V1.Model.FileReference.t`, *default:* `nil`) - Required. The ipa stored at this file should be used to run the test.
* `roboScript` (*type:* `GoogleApi.Testing.V1.Model.FileReference.t`, *default:* `nil`) - An optional Roboscript to customize the crawl. See https://firebase.google.com/docs/test-lab/android/robo-scripts-reference for more information about Roboscripts.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:appBundleId => String.t() | nil,
:appIpa => GoogleApi.Testing.V1.Model.FileReference.t() | nil,
:roboScript => GoogleApi.Testing.V1.Model.FileReference.t() | nil
}

field(:appBundleId)
field(:appIpa, as: GoogleApi.Testing.V1.Model.FileReference)
field(:roboScript, as: GoogleApi.Testing.V1.Model.FileReference)
end

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

defimpl Poison.Encoder, for: GoogleApi.Testing.V1.Model.IosRoboTest do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Loading

0 comments on commit e4ee43f

Please sign in to comment.