Skip to content

Commit

Permalink
Add PreloadConfiguration and AdFormat types.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 683324578
  • Loading branch information
Mobile Ads Developer Relations authored and copybara-github committed Oct 7, 2024
1 parent 4fc0da2 commit 8437f8c
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 0 deletions.
35 changes: 35 additions & 0 deletions source/plugin/Assets/GoogleMobileAds/Api/Core/AdFormat.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (C) 2024 Google, Inc.
//
// 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.

namespace GoogleMobileAds.Api
{
/// <summary>
/// Format of the ad being requested.
/// </summary>
public enum AdFormat
{
/// Banner ad format.
BANNER = 0,
/// Interstitial ad format.
INTERSTITIAL = 1,
/// Rewarded ad format.
REWARDED = 2,
/// Rewarded interstitial ad format.
REWARDED_INTERSTITIAL = 3,
/// Native ad format.
NATIVE = 4,
/// App open ad format.
APP_OPEN_AD = 5
}
}
11 changes: 11 additions & 0 deletions source/plugin/Assets/GoogleMobileAds/Api/Core/AdFormat.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright (C) 2024 Google, Inc.
//
// 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.

using System;

namespace GoogleMobileAds.Api
{
/// <summary>
/// Configuration for preloading ads.
/// </summary>
[Serializable]
public sealed class PreloadConfiguration
{
/// <summary>
/// The ad unit ID of the ad to preload.
/// </summary>
public string AdUnitId;

/// <summary>
/// The ad format of the ad to preload.
/// </summary>
public AdFormat Format;

/// <summary>
/// The ad request to preload.
/// </summary>
public AdRequest Request;

public PreloadConfiguration() { }

public PreloadConfiguration(PreloadConfiguration configuration)
{
AdUnitId = configuration.AdUnitId;
Format = configuration.Format;
Request = configuration.Request;
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8437f8c

Please sign in to comment.