-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
100 changed files
with
9,494 additions
and
3,830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132 changes: 132 additions & 0 deletions
132
AdsInterface/src/main/java/com/amazon/ads/AdMetaData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
/** | ||
* Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0/ | ||
* | ||
* or in the "license" file accompanying this file. This file 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. | ||
*/ | ||
package com.amazon.ads; | ||
|
||
/** | ||
* Class to hold Ad metadata. | ||
*/ | ||
public class AdMetaData { | ||
|
||
/** | ||
* Ad ID. | ||
*/ | ||
private String adId = ""; | ||
|
||
/** | ||
* Duration of ad played on screen. | ||
*/ | ||
private long durationPlayed; | ||
|
||
/** | ||
* Duration of ad received in ad meta data. | ||
*/ | ||
private long durationReceived; | ||
|
||
/** | ||
* Ad Type: Pre roll, Mid roll, Post roll | ||
*/ | ||
private String adType = ""; | ||
|
||
/** | ||
* set id of current ad. | ||
* | ||
* @param adId current ad id received in ad metadata. | ||
*/ | ||
public void setAdId(String adId) { | ||
|
||
this.adId = adId; | ||
} | ||
|
||
/** | ||
* set duration of current ad played on screen. | ||
* | ||
* @param durationPlayed duration of ad played on screen | ||
*/ | ||
public void setDurationPlayed(long durationPlayed) { | ||
|
||
this.durationPlayed = durationPlayed; | ||
} | ||
|
||
/** | ||
* set duration of ad received in ad meta data. | ||
* | ||
* @param durationReceived duration of ad received in ad meta data | ||
*/ | ||
public void setDurationReceived(long durationReceived) { | ||
|
||
this.durationReceived = durationReceived; | ||
} | ||
|
||
/** | ||
* set ad type in ad meta data. | ||
* | ||
* @param adType pre, mid or post roll | ||
*/ | ||
public void setAdType(String adType) { | ||
|
||
this.adType = adType; | ||
} | ||
|
||
/** | ||
* Return the ad Id. | ||
* | ||
* @return id of current ad. | ||
*/ | ||
public String getAdId() { | ||
|
||
return adId; | ||
} | ||
|
||
/** | ||
* Return the duration played of current ad. | ||
* | ||
* @return duration of ad played on screen. | ||
*/ | ||
public long getDurationPlayed() { | ||
|
||
return durationPlayed; | ||
} | ||
|
||
/** | ||
* Return the duration received from ad module. | ||
* | ||
* @return duration of ad as received from ad meta data. | ||
*/ | ||
public long getDurationReceived() { | ||
|
||
return durationReceived; | ||
} | ||
|
||
/** | ||
* Return the ad type. | ||
* | ||
* @return type of current ad. | ||
*/ | ||
public String getAdType() { | ||
|
||
return adType; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
|
||
return "AdMetaData{" + | ||
"adId='" + adId + '\'' + | ||
", durationPlayed=" + durationPlayed + | ||
", durationReceived=" + durationReceived + | ||
", adType='" + adType + '\'' + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.