text:
/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.dfareporting.model;

/**
 * Contains properties of a Creative.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the DCM/DFA Reporting And Trafficking API. For a detailed
 * explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class Creative extends com.google.api.client.json.GenericJson {

  /**
   * Account ID of this creative. This field, if left unset, will be auto-generated for both insert
   * and update operations. Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long accountId;

  /**
   * Whether the creative is active. Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean active;

  /**
   * Ad parameters user for VPAID creative. This is a read-only field. Applicable to the following
   * creative types: all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String adParameters;

  /**
   * Keywords for a Rich Media creative. Keywords let you customize the creative settings of a Rich
   * Media ad running on your site without having to contact the advertiser. You can use keywords to
   * dynamically change the look or functionality of a creative. Applicable to the following
   * creative types: all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> adTagKeys;

  /**
   * Advertiser ID of this creative. This is a required field. Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long advertiserId;

  /**
   * Whether script access is allowed for this creative. This is a read-only and deprecated field
   * which will automatically be set to true on update. Applicable to the following creative types:
   * FLASH_INPAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean allowScriptAccess;

  /**
   * Whether the creative is archived. Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean archived;

  /**
   * Type of artwork used for the creative. This is a read-only field. Applicable to the following
   * creative types: all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String artworkType;

  /**
   * Source application where creative was authored. Presently, only DBM authored creatives will
   * have this field set. Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String authoringSource;

  /**
   * Authoring tool for HTML5 banner creatives. This is a read-only field. Applicable to the
   * following creative types: HTML5_BANNER.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String authoringTool;

  /**
   * Whether images are automatically advanced for image gallery creatives. Applicable to the
   * following creative types: DISPLAY_IMAGE_GALLERY.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean autoAdvanceImages;

  /**
   * The 6-character HTML color code, beginning with #, for the background of the window area where
   * the Flash file is displayed. Default is white. Applicable to the following creative types:
   * FLASH_INPAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String backgroundColor;

  /**
   * Click-through URL for backup image. Applicable to ENHANCED_BANNER when the primary asset type
   * is not HTML_IMAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private CreativeClickThroughUrl backupImageClickThroughUrl;

  /**
   * List of feature dependencies that will cause a backup image to be served if the browser that
   * serves the ad does not support them. Feature dependencies are features that a browser must be
   * able to support in order to render your HTML5 creative asset correctly. This field is initially
   * auto-generated to contain all features detected by Campaign Manager for all the assets of this
   * creative and can then be modified by the client. To reset this field, copy over all the
   * creativeAssets' detected features. Applicable to the following creative types: HTML5_BANNER.
   * Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> backupImageFeatures;

  /**
   * Reporting label used for HTML5 banner backup image. Applicable to the following creative types:
   * DISPLAY when the primary asset type is not HTML_IMAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String backupImageReportingLabel;

  /**
   * Target window for backup image. Applicable to the following creative types: FLASH_INPAGE and
   * HTML5_BANNER. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private TargetWindow backupImageTargetWindow;

  /**
   * Click tags of the creative. For DISPLAY, FLASH_INPAGE, and HTML5_BANNER creatives, this is a
   * subset of detected click tags for the assets associated with this creative. After creating a
   * flash asset, detected click tags will be returned in the creativeAssetMetadata. When inserting
   * the creative, populate the creative clickTags field using the creativeAssetMetadata.clickTags
   * field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly one entry in this list for
   * each image creative asset. A click tag is matched with a corresponding creative asset by
   * matching the clickTag.name field with the creativeAsset.assetIdentifier.name field. Applicable
   * to the following creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable
   * to DISPLAY when the primary asset type is not HTML_IMAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<ClickTag> clickTags;

  static {
    // hack to force ProGuard to consider ClickTag used, since otherwise it would be stripped out
    // see https://github.com/google/google-api-java-client/issues/543
    com.google.api.client.util.Data.nullOf(ClickTag.class);
  }

  /**
   * Industry standard ID assigned to creative for reach and frequency. Applicable to
   * INSTREAM_VIDEO_REDIRECT creatives.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String commercialId;

  /**
   * List of companion creatives assigned to an in-Stream video creative. Acceptable values include
   * IDs of existing flash and image creatives. Applicable to the following creative types: all
   * VPAID and all INSTREAM_VIDEO with dynamicAssetSelection set to false.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.util.List<java.lang.Long> companionCreatives;

  /**
   * Compatibilities associated with this creative. This is a read-only field. DISPLAY and
   * DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices or in mobile
   * apps for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering
   * in mobile apps. Only pre-existing creatives may have these compatibilities since new creatives
   * will either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead. IN_STREAM_VIDEO refers to
   * rendering in in-stream video ads developed with the VAST standard. Applicable to all creative
   * types.
   *
   * Acceptable values are: - "APP" - "APP_INTERSTITIAL" - "IN_STREAM_VIDEO" - "DISPLAY" -
   * "DISPLAY_INTERSTITIAL"
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> compatibility;

  /**
   * Whether Flash assets associated with the creative need to be automatically converted to HTML5.
   * This flag is enabled by default and users can choose to disable it if they don't want the
   * system to generate and use HTML5 asset for this creative. Applicable to the following creative
   * type: FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean convertFlashToHtml5;

  /**
   * List of counter events configured for the creative. For DISPLAY_IMAGE_GALLERY creatives, these
   * are read-only and auto-generated from clickTags. Applicable to the following creative types:
   * DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<CreativeCustomEvent> counterCustomEvents;

  /**
   * Required if dynamicAssetSelection is true.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private CreativeAssetSelection creativeAssetSelection;

  /**
   * Assets associated with a creative. Applicable to all but the following creative types:
   * INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<CreativeAsset> creativeAssets;

  /**
   * Creative field assignments for this creative. Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<CreativeFieldAssignment> creativeFieldAssignments;

  /**
   * Custom key-values for a Rich Media creative. Key-values let you customize the creative settings
   * of a Rich Media ad running on your site without having to contact the advertiser. You can use
   * key-values to dynamically change the look or functionality of a creative. Applicable to the
   * following creative types: all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> customKeyValues;

  /**
   * Set this to true to enable the use of rules to target individual assets in this creative. When
   * set to true creativeAssetSelection must be set. This also controls asset-level companions. When
   * this is true, companion creatives should be assigned to creative assets. Learn more. Applicable
   * to INSTREAM_VIDEO creatives.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean dynamicAssetSelection;

  /**
   * List of exit events configured for the creative. For DISPLAY and DISPLAY_IMAGE_GALLERY
   * creatives, these are read-only and auto-generated from clickTags, For DISPLAY, an event is also
   * created from the backupImageReportingLabel. Applicable to the following creative types:
   * DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
   * asset type is not HTML_IMAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<CreativeCustomEvent> exitCustomEvents;

  /**
   * OpenWindow FSCommand of this creative. This lets the SWF file communicate with either Flash
   * Player or the program hosting Flash Player, such as a web browser. This is only triggered if
   * allowScriptAccess field is true. Applicable to the following creative types: FLASH_INPAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private FsCommand fsCommand;

  /**
   * HTML code for the creative. This is a required field when applicable. This field is ignored if
   * htmlCodeLocked is true. Applicable to the following creative types: all CUSTOM, FLASH_INPAGE,
   * and HTML5_BANNER, and all RICH_MEDIA.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String htmlCode;

  /**
   * Whether HTML code is generated by Campaign Manager or manually entered. Set to true to ignore
   * changes to htmlCode. Applicable to the following creative types: FLASH_INPAGE and HTML5_BANNER.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean htmlCodeLocked;

  /**
   * ID of this creative. This is a read-only, auto-generated field. Applicable to all creative
   * types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long id;

  /**
   * Dimension value for the ID of this creative. This is a read-only field. Applicable to all
   * creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private DimensionValue idDimensionValue;

  /**
   * Identifies what kind of resource this is. Value: the fixed string "dfareporting#creative".
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String kind;

  /**
   * Creative last modification information. This is a read-only field. Applicable to all creative
   * types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private LastModifiedInfo lastModifiedInfo;

  /**
   * Latest Studio trafficked creative ID associated with rich media and VPAID creatives. This is a
   * read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long latestTraffickedCreativeId;

  /**
   * Name of the creative. This is a required field and must be less than 256 characters long.
   * Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * Override CSS value for rich media creatives. Applicable to the following creative types: all
   * RICH_MEDIA.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String overrideCss;

  /**
   * The asset ID of the polite load image asset. Applicable to the creative type: DISPLAY.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long politeLoadAssetId;

  /**
   * Amount of time to play the video before counting a view. Applicable to the following creative
   * types: all INSTREAM_VIDEO.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private VideoOffset progressOffset;

  /**
   * URL of hosted image or hosted video or another ad tag. For INSTREAM_VIDEO_REDIRECT creatives
   * this is the in-stream video redirect URL. The standard for a VAST (Video Ad Serving Template)
   * ad response allows for a redirect link to another VAST 2.0 or 3.0 call. This is a required
   * field when applicable. Applicable to the following creative types: DISPLAY_REDIRECT,
   * INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String redirectUrl;

  /**
   * ID of current rendering version. This is a read-only field. Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long renderingId;

  /**
   * Dimension value for the rendering ID of this creative. This is a read-only field. Applicable to
   * all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private DimensionValue renderingIdDimensionValue;

  /**
   * The minimum required Flash plugin version for this creative. For example, 11.2.202.235. This is
   * a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String requiredFlashPluginVersion;

  /**
   * The internal Flash version for this creative as calculated by Studio. This is a read-only
   * field. Applicable to the following creative types: FLASH_INPAGE all RICH_MEDIA, and all VPAID.
   * Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer requiredFlashVersion;

  /**
   * Size associated with this creative. When inserting or updating a creative either the size ID
   * field or size width and height fields can be used. This is a required field when applicable;
   * however for IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a primary asset of
   * type HTML_IMAGE, if left blank, this field will be automatically set using the actual size of
   * the associated image assets. Applicable to the following creative types: DISPLAY,
   * DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Size size;

  /**
   * Amount of time to play the video before the skip button appears. Applicable to the following
   * creative types: all INSTREAM_VIDEO.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private VideoOffset skipOffset;

  /**
   * Whether the user can choose to skip the creative. Applicable to the following creative types:
   * all INSTREAM_VIDEO and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean skippable;

  /**
   * Whether the creative is SSL-compliant. This is a read-only field. Applicable to all creative
   * types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean sslCompliant;

  /**
   * Whether creative should be treated as SSL compliant even if the system scan shows it's not.
   * Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean sslOverride;

  /**
   * Studio advertiser ID associated with rich media and VPAID creatives. This is a read-only field.
   * Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long studioAdvertiserId;

  /**
   * Studio creative ID associated with rich media and VPAID creatives. This is a read-only field.
   * Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long studioCreativeId;

  /**
   * Studio trafficked creative ID associated with rich media and VPAID creatives. This is a read-
   * only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long studioTraffickedCreativeId;

  /**
   * Subaccount ID of this creative. This field, if left unset, will be auto-generated for both
   * insert and update operations. Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long subaccountId;

  /**
   * Third-party URL used to record backup image impressions. Applicable to the following creative
   * types: all RICH_MEDIA.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String thirdPartyBackupImageImpressionsUrl;

  /**
   * Third-party URL used to record rich media impressions. Applicable to the following creative
   * types: all RICH_MEDIA.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String thirdPartyRichMediaImpressionsUrl;

  /**
   * Third-party URLs for tracking in-stream video creative events. Applicable to the following
   * creative types: all INSTREAM_VIDEO and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<ThirdPartyTrackingUrl> thirdPartyUrls;

  /**
   * List of timer events configured for the creative. For DISPLAY_IMAGE_GALLERY creatives, these
   * are read-only and auto-generated from clickTags. Applicable to the following creative types:
   * DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
   * asset is not HTML_IMAGE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<CreativeCustomEvent> timerCustomEvents;

  /**
   * Combined size of all creative assets. This is a read-only field. Applicable to the following
   * creative types: all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long totalFileSize;

  /**
   * Type of this creative. This is a required field. Applicable to all creative types.
   *
   * Note: FLASH_INPAGE, HTML5_BANNER, and IMAGE are only used for existing creatives. New creatives
   * should use DISPLAY as a replacement for these types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String type;

  /**
   * A Universal Ad ID as per the VAST 4.0 spec. Applicable to the following creative types:
   * INSTREAM_VIDEO and VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private UniversalAdId universalAdId;

  /**
   * The version number helps you keep track of multiple versions of your creative in your reports.
   * The version number will always be auto-generated during insert operations to start at 1. For
   * tracking creatives the version cannot be incremented and will always remain at 1. For all other
   * creative types the version can be incremented only by 1 during update operations. In addition,
   * the version will be automatically incremented by 1 when undergoing Rich Media creative merging.
   * Applicable to all creative types.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer version;

  /**
   * Description of the video ad. Applicable to the following creative types: all INSTREAM_VIDEO and
   * all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String videoDescription;

  /**
   * Creative video duration in seconds. This is a read-only field. Applicable to the following
   * creative types: INSTREAM_VIDEO, all RICH_MEDIA, and all VPAID.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Float videoDuration;

  /**
   * Account ID of this creative. This field, if left unset, will be auto-generated for both insert
   * and update operations. Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.lang.Long getAccountId() {
    return accountId;
  }

  /**
   * Account ID of this creative. This field, if left unset, will be auto-generated for both insert
   * and update operations. Applicable to all creative types.
   * @param accountId accountId or {@code null} for none
   */
  public Creative setAccountId(java.lang.Long accountId) {
    this.accountId = accountId;
    return this;
  }

  /**
   * Whether the creative is active. Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getActive() {
    return active;
  }

  /**
   * Whether the creative is active. Applicable to all creative types.
   * @param active active or {@code null} for none
   */
  public Creative setActive(java.lang.Boolean active) {
    this.active = active;
    return this;
  }

  /**
   * Ad parameters user for VPAID creative. This is a read-only field. Applicable to the following
   * creative types: all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.String getAdParameters() {
    return adParameters;
  }

  /**
   * Ad parameters user for VPAID creative. This is a read-only field. Applicable to the following
   * creative types: all VPAID.
   * @param adParameters adParameters or {@code null} for none
   */
  public Creative setAdParameters(java.lang.String adParameters) {
    this.adParameters = adParameters;
    return this;
  }

  /**
   * Keywords for a Rich Media creative. Keywords let you customize the creative settings of a Rich
   * Media ad running on your site without having to contact the advertiser. You can use keywords to
   * dynamically change the look or functionality of a creative. Applicable to the following
   * creative types: all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getAdTagKeys() {
    return adTagKeys;
  }

  /**
   * Keywords for a Rich Media creative. Keywords let you customize the creative settings of a Rich
   * Media ad running on your site without having to contact the advertiser. You can use keywords to
   * dynamically change the look or functionality of a creative. Applicable to the following
   * creative types: all RICH_MEDIA, and all VPAID.
   * @param adTagKeys adTagKeys or {@code null} for none
   */
  public Creative setAdTagKeys(java.util.List<java.lang.String> adTagKeys) {
    this.adTagKeys = adTagKeys;
    return this;
  }

  /**
   * Advertiser ID of this creative. This is a required field. Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.lang.Long getAdvertiserId() {
    return advertiserId;
  }

  /**
   * Advertiser ID of this creative. This is a required field. Applicable to all creative types.
   * @param advertiserId advertiserId or {@code null} for none
   */
  public Creative setAdvertiserId(java.lang.Long advertiserId) {
    this.advertiserId = advertiserId;
    return this;
  }

  /**
   * Whether script access is allowed for this creative. This is a read-only and deprecated field
   * which will automatically be set to true on update. Applicable to the following creative types:
   * FLASH_INPAGE.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getAllowScriptAccess() {
    return allowScriptAccess;
  }

  /**
   * Whether script access is allowed for this creative. This is a read-only and deprecated field
   * which will automatically be set to true on update. Applicable to the following creative types:
   * FLASH_INPAGE.
   * @param allowScriptAccess allowScriptAccess or {@code null} for none
   */
  public Creative setAllowScriptAccess(java.lang.Boolean allowScriptAccess) {
    this.allowScriptAccess = allowScriptAccess;
    return this;
  }

  /**
   * Whether the creative is archived. Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getArchived() {
    return archived;
  }

  /**
   * Whether the creative is archived. Applicable to all creative types.
   * @param archived archived or {@code null} for none
   */
  public Creative setArchived(java.lang.Boolean archived) {
    this.archived = archived;
    return this;
  }

  /**
   * Type of artwork used for the creative. This is a read-only field. Applicable to the following
   * creative types: all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.String getArtworkType() {
    return artworkType;
  }

  /**
   * Type of artwork used for the creative. This is a read-only field. Applicable to the following
   * creative types: all RICH_MEDIA, and all VPAID.
   * @param artworkType artworkType or {@code null} for none
   */
  public Creative setArtworkType(java.lang.String artworkType) {
    this.artworkType = artworkType;
    return this;
  }

  /**
   * Source application where creative was authored. Presently, only DBM authored creatives will
   * have this field set. Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.lang.String getAuthoringSource() {
    return authoringSource;
  }

  /**
   * Source application where creative was authored. Presently, only DBM authored creatives will
   * have this field set. Applicable to all creative types.
   * @param authoringSource authoringSource or {@code null} for none
   */
  public Creative setAuthoringSource(java.lang.String authoringSource) {
    this.authoringSource = authoringSource;
    return this;
  }

  /**
   * Authoring tool for HTML5 banner creatives. This is a read-only field. Applicable to the
   * following creative types: HTML5_BANNER.
   * @return value or {@code null} for none
   */
  public java.lang.String getAuthoringTool() {
    return authoringTool;
  }

  /**
   * Authoring tool for HTML5 banner creatives. This is a read-only field. Applicable to the
   * following creative types: HTML5_BANNER.
   * @param authoringTool authoringTool or {@code null} for none
   */
  public Creative setAuthoringTool(java.lang.String authoringTool) {
    this.authoringTool = authoringTool;
    return this;
  }

  /**
   * Whether images are automatically advanced for image gallery creatives. Applicable to the
   * following creative types: DISPLAY_IMAGE_GALLERY.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getAutoAdvanceImages() {
    return autoAdvanceImages;
  }

  /**
   * Whether images are automatically advanced for image gallery creatives. Applicable to the
   * following creative types: DISPLAY_IMAGE_GALLERY.
   * @param autoAdvanceImages autoAdvanceImages or {@code null} for none
   */
  public Creative setAutoAdvanceImages(java.lang.Boolean autoAdvanceImages) {
    this.autoAdvanceImages = autoAdvanceImages;
    return this;
  }

  /**
   * The 6-character HTML color code, beginning with #, for the background of the window area where
   * the Flash file is displayed. Default is white. Applicable to the following creative types:
   * FLASH_INPAGE.
   * @return value or {@code null} for none
   */
  public java.lang.String getBackgroundColor() {
    return backgroundColor;
  }

  /**
   * The 6-character HTML color code, beginning with #, for the background of the window area where
   * the Flash file is displayed. Default is white. Applicable to the following creative types:
   * FLASH_INPAGE.
   * @param backgroundColor backgroundColor or {@code null} for none
   */
  public Creative setBackgroundColor(java.lang.String backgroundColor) {
    this.backgroundColor = backgroundColor;
    return this;
  }

  /**
   * Click-through URL for backup image. Applicable to ENHANCED_BANNER when the primary asset type
   * is not HTML_IMAGE.
   * @return value or {@code null} for none
   */
  public CreativeClickThroughUrl getBackupImageClickThroughUrl() {
    return backupImageClickThroughUrl;
  }

  /**
   * Click-through URL for backup image. Applicable to ENHANCED_BANNER when the primary asset type
   * is not HTML_IMAGE.
   * @param backupImageClickThroughUrl backupImageClickThroughUrl or {@code null} for none
   */
  public Creative setBackupImageClickThroughUrl(CreativeClickThroughUrl backupImageClickThroughUrl) {
    this.backupImageClickThroughUrl = backupImageClickThroughUrl;
    return this;
  }

  /**
   * List of feature dependencies that will cause a backup image to be served if the browser that
   * serves the ad does not support them. Feature dependencies are features that a browser must be
   * able to support in order to render your HTML5 creative asset correctly. This field is initially
   * auto-generated to contain all features detected by Campaign Manager for all the assets of this
   * creative and can then be modified by the client. To reset this field, copy over all the
   * creativeAssets' detected features. Applicable to the following creative types: HTML5_BANNER.
   * Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getBackupImageFeatures() {
    return backupImageFeatures;
  }

  /**
   * List of feature dependencies that will cause a backup image to be served if the browser that
   * serves the ad does not support them. Feature dependencies are features that a browser must be
   * able to support in order to render your HTML5 creative asset correctly. This field is initially
   * auto-generated to contain all features detected by Campaign Manager for all the assets of this
   * creative and can then be modified by the client. To reset this field, copy over all the
   * creativeAssets' detected features. Applicable to the following creative types: HTML5_BANNER.
   * Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * @param backupImageFeatures backupImageFeatures or {@code null} for none
   */
  public Creative setBackupImageFeatures(java.util.List<java.lang.String> backupImageFeatures) {
    this.backupImageFeatures = backupImageFeatures;
    return this;
  }

  /**
   * Reporting label used for HTML5 banner backup image. Applicable to the following creative types:
   * DISPLAY when the primary asset type is not HTML_IMAGE.
   * @return value or {@code null} for none
   */
  public java.lang.String getBackupImageReportingLabel() {
    return backupImageReportingLabel;
  }

  /**
   * Reporting label used for HTML5 banner backup image. Applicable to the following creative types:
   * DISPLAY when the primary asset type is not HTML_IMAGE.
   * @param backupImageReportingLabel backupImageReportingLabel or {@code null} for none
   */
  public Creative setBackupImageReportingLabel(java.lang.String backupImageReportingLabel) {
    this.backupImageReportingLabel = backupImageReportingLabel;
    return this;
  }

  /**
   * Target window for backup image. Applicable to the following creative types: FLASH_INPAGE and
   * HTML5_BANNER. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * @return value or {@code null} for none
   */
  public TargetWindow getBackupImageTargetWindow() {
    return backupImageTargetWindow;
  }

  /**
   * Target window for backup image. Applicable to the following creative types: FLASH_INPAGE and
   * HTML5_BANNER. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * @param backupImageTargetWindow backupImageTargetWindow or {@code null} for none
   */
  public Creative setBackupImageTargetWindow(TargetWindow backupImageTargetWindow) {
    this.backupImageTargetWindow = backupImageTargetWindow;
    return this;
  }

  /**
   * Click tags of the creative. For DISPLAY, FLASH_INPAGE, and HTML5_BANNER creatives, this is a
   * subset of detected click tags for the assets associated with this creative. After creating a
   * flash asset, detected click tags will be returned in the creativeAssetMetadata. When inserting
   * the creative, populate the creative clickTags field using the creativeAssetMetadata.clickTags
   * field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly one entry in this list for
   * each image creative asset. A click tag is matched with a corresponding creative asset by
   * matching the clickTag.name field with the creativeAsset.assetIdentifier.name field. Applicable
   * to the following creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable
   * to DISPLAY when the primary asset type is not HTML_IMAGE.
   * @return value or {@code null} for none
   */
  public java.util.List<ClickTag> getClickTags() {
    return clickTags;
  }

  /**
   * Click tags of the creative. For DISPLAY, FLASH_INPAGE, and HTML5_BANNER creatives, this is a
   * subset of detected click tags for the assets associated with this creative. After creating a
   * flash asset, detected click tags will be returned in the creativeAssetMetadata. When inserting
   * the creative, populate the creative clickTags field using the creativeAssetMetadata.clickTags
   * field. For DISPLAY_IMAGE_GALLERY creatives, there should be exactly one entry in this list for
   * each image creative asset. A click tag is matched with a corresponding creative asset by
   * matching the clickTag.name field with the creativeAsset.assetIdentifier.name field. Applicable
   * to the following creative types: DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER. Applicable
   * to DISPLAY when the primary asset type is not HTML_IMAGE.
   * @param clickTags clickTags or {@code null} for none
   */
  public Creative setClickTags(java.util.List<ClickTag> clickTags) {
    this.clickTags = clickTags;
    return this;
  }

  /**
   * Industry standard ID assigned to creative for reach and frequency. Applicable to
   * INSTREAM_VIDEO_REDIRECT creatives.
   * @return value or {@code null} for none
   */
  public java.lang.String getCommercialId() {
    return commercialId;
  }

  /**
   * Industry standard ID assigned to creative for reach and frequency. Applicable to
   * INSTREAM_VIDEO_REDIRECT creatives.
   * @param commercialId commercialId or {@code null} for none
   */
  public Creative setCommercialId(java.lang.String commercialId) {
    this.commercialId = commercialId;
    return this;
  }

  /**
   * List of companion creatives assigned to an in-Stream video creative. Acceptable values include
   * IDs of existing flash and image creatives. Applicable to the following creative types: all
   * VPAID and all INSTREAM_VIDEO with dynamicAssetSelection set to false.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.Long> getCompanionCreatives() {
    return companionCreatives;
  }

  /**
   * List of companion creatives assigned to an in-Stream video creative. Acceptable values include
   * IDs of existing flash and image creatives. Applicable to the following creative types: all
   * VPAID and all INSTREAM_VIDEO with dynamicAssetSelection set to false.
   * @param companionCreatives companionCreatives or {@code null} for none
   */
  public Creative setCompanionCreatives(java.util.List<java.lang.Long> companionCreatives) {
    this.companionCreatives = companionCreatives;
    return this;
  }

  /**
   * Compatibilities associated with this creative. This is a read-only field. DISPLAY and
   * DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices or in mobile
   * apps for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering
   * in mobile apps. Only pre-existing creatives may have these compatibilities since new creatives
   * will either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead. IN_STREAM_VIDEO refers to
   * rendering in in-stream video ads developed with the VAST standard. Applicable to all creative
   * types.
   *
   * Acceptable values are: - "APP" - "APP_INTERSTITIAL" - "IN_STREAM_VIDEO" - "DISPLAY" -
   * "DISPLAY_INTERSTITIAL"
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getCompatibility() {
    return compatibility;
  }

  /**
   * Compatibilities associated with this creative. This is a read-only field. DISPLAY and
   * DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile devices or in mobile
   * apps for regular or interstitial ads, respectively. APP and APP_INTERSTITIAL are for rendering
   * in mobile apps. Only pre-existing creatives may have these compatibilities since new creatives
   * will either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead. IN_STREAM_VIDEO refers to
   * rendering in in-stream video ads developed with the VAST standard. Applicable to all creative
   * types.
   *
   * Acceptable values are: - "APP" - "APP_INTERSTITIAL" - "IN_STREAM_VIDEO" - "DISPLAY" -
   * "DISPLAY_INTERSTITIAL"
   * @param compatibility compatibility or {@code null} for none
   */
  public Creative setCompatibility(java.util.List<java.lang.String> compatibility) {
    this.compatibility = compatibility;
    return this;
  }

  /**
   * Whether Flash assets associated with the creative need to be automatically converted to HTML5.
   * This flag is enabled by default and users can choose to disable it if they don't want the
   * system to generate and use HTML5 asset for this creative. Applicable to the following creative
   * type: FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getConvertFlashToHtml5() {
    return convertFlashToHtml5;
  }

  /**
   * Whether Flash assets associated with the creative need to be automatically converted to HTML5.
   * This flag is enabled by default and users can choose to disable it if they don't want the
   * system to generate and use HTML5 asset for this creative. Applicable to the following creative
   * type: FLASH_INPAGE. Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * @param convertFlashToHtml5 convertFlashToHtml5 or {@code null} for none
   */
  public Creative setConvertFlashToHtml5(java.lang.Boolean convertFlashToHtml5) {
    this.convertFlashToHtml5 = convertFlashToHtml5;
    return this;
  }

  /**
   * List of counter events configured for the creative. For DISPLAY_IMAGE_GALLERY creatives, these
   * are read-only and auto-generated from clickTags. Applicable to the following creative types:
   * DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.util.List<CreativeCustomEvent> getCounterCustomEvents() {
    return counterCustomEvents;
  }

  /**
   * List of counter events configured for the creative. For DISPLAY_IMAGE_GALLERY creatives, these
   * are read-only and auto-generated from clickTags. Applicable to the following creative types:
   * DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID.
   * @param counterCustomEvents counterCustomEvents or {@code null} for none
   */
  public Creative setCounterCustomEvents(java.util.List<CreativeCustomEvent> counterCustomEvents) {
    this.counterCustomEvents = counterCustomEvents;
    return this;
  }

  /**
   * Required if dynamicAssetSelection is true.
   * @return value or {@code null} for none
   */
  public CreativeAssetSelection getCreativeAssetSelection() {
    return creativeAssetSelection;
  }

  /**
   * Required if dynamicAssetSelection is true.
   * @param creativeAssetSelection creativeAssetSelection or {@code null} for none
   */
  public Creative setCreativeAssetSelection(CreativeAssetSelection creativeAssetSelection) {
    this.creativeAssetSelection = creativeAssetSelection;
    return this;
  }

  /**
   * Assets associated with a creative. Applicable to all but the following creative types:
   * INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT
   * @return value or {@code null} for none
   */
  public java.util.List<CreativeAsset> getCreativeAssets() {
    return creativeAssets;
  }

  /**
   * Assets associated with a creative. Applicable to all but the following creative types:
   * INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and REDIRECT
   * @param creativeAssets creativeAssets or {@code null} for none
   */
  public Creative setCreativeAssets(java.util.List<CreativeAsset> creativeAssets) {
    this.creativeAssets = creativeAssets;
    return this;
  }

  /**
   * Creative field assignments for this creative. Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.util.List<CreativeFieldAssignment> getCreativeFieldAssignments() {
    return creativeFieldAssignments;
  }

  /**
   * Creative field assignments for this creative. Applicable to all creative types.
   * @param creativeFieldAssignments creativeFieldAssignments or {@code null} for none
   */
  public Creative setCreativeFieldAssignments(java.util.List<CreativeFieldAssignment> creativeFieldAssignments) {
    this.creativeFieldAssignments = creativeFieldAssignments;
    return this;
  }

  /**
   * Custom key-values for a Rich Media creative. Key-values let you customize the creative settings
   * of a Rich Media ad running on your site without having to contact the advertiser. You can use
   * key-values to dynamically change the look or functionality of a creative. Applicable to the
   * following creative types: all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getCustomKeyValues() {
    return customKeyValues;
  }

  /**
   * Custom key-values for a Rich Media creative. Key-values let you customize the creative settings
   * of a Rich Media ad running on your site without having to contact the advertiser. You can use
   * key-values to dynamically change the look or functionality of a creative. Applicable to the
   * following creative types: all RICH_MEDIA, and all VPAID.
   * @param customKeyValues customKeyValues or {@code null} for none
   */
  public Creative setCustomKeyValues(java.util.List<java.lang.String> customKeyValues) {
    this.customKeyValues = customKeyValues;
    return this;
  }

  /**
   * Set this to true to enable the use of rules to target individual assets in this creative. When
   * set to true creativeAssetSelection must be set. This also controls asset-level companions. When
   * this is true, companion creatives should be assigned to creative assets. Learn more. Applicable
   * to INSTREAM_VIDEO creatives.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getDynamicAssetSelection() {
    return dynamicAssetSelection;
  }

  /**
   * Set this to true to enable the use of rules to target individual assets in this creative. When
   * set to true creativeAssetSelection must be set. This also controls asset-level companions. When
   * this is true, companion creatives should be assigned to creative assets. Learn more. Applicable
   * to INSTREAM_VIDEO creatives.
   * @param dynamicAssetSelection dynamicAssetSelection or {@code null} for none
   */
  public Creative setDynamicAssetSelection(java.lang.Boolean dynamicAssetSelection) {
    this.dynamicAssetSelection = dynamicAssetSelection;
    return this;
  }

  /**
   * List of exit events configured for the creative. For DISPLAY and DISPLAY_IMAGE_GALLERY
   * creatives, these are read-only and auto-generated from clickTags, For DISPLAY, an event is also
   * created from the backupImageReportingLabel. Applicable to the following creative types:
   * DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
   * asset type is not HTML_IMAGE.
   * @return value or {@code null} for none
   */
  public java.util.List<CreativeCustomEvent> getExitCustomEvents() {
    return exitCustomEvents;
  }

  /**
   * List of exit events configured for the creative. For DISPLAY and DISPLAY_IMAGE_GALLERY
   * creatives, these are read-only and auto-generated from clickTags, For DISPLAY, an event is also
   * created from the backupImageReportingLabel. Applicable to the following creative types:
   * DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
   * asset type is not HTML_IMAGE.
   * @param exitCustomEvents exitCustomEvents or {@code null} for none
   */
  public Creative setExitCustomEvents(java.util.List<CreativeCustomEvent> exitCustomEvents) {
    this.exitCustomEvents = exitCustomEvents;
    return this;
  }

  /**
   * OpenWindow FSCommand of this creative. This lets the SWF file communicate with either Flash
   * Player or the program hosting Flash Player, such as a web browser. This is only triggered if
   * allowScriptAccess field is true. Applicable to the following creative types: FLASH_INPAGE.
   * @return value or {@code null} for none
   */
  public FsCommand getFsCommand() {
    return fsCommand;
  }

  /**
   * OpenWindow FSCommand of this creative. This lets the SWF file communicate with either Flash
   * Player or the program hosting Flash Player, such as a web browser. This is only triggered if
   * allowScriptAccess field is true. Applicable to the following creative types: FLASH_INPAGE.
   * @param fsCommand fsCommand or {@code null} for none
   */
  public Creative setFsCommand(FsCommand fsCommand) {
    this.fsCommand = fsCommand;
    return this;
  }

  /**
   * HTML code for the creative. This is a required field when applicable. This field is ignored if
   * htmlCodeLocked is true. Applicable to the following creative types: all CUSTOM, FLASH_INPAGE,
   * and HTML5_BANNER, and all RICH_MEDIA.
   * @return value or {@code null} for none
   */
  public java.lang.String getHtmlCode() {
    return htmlCode;
  }

  /**
   * HTML code for the creative. This is a required field when applicable. This field is ignored if
   * htmlCodeLocked is true. Applicable to the following creative types: all CUSTOM, FLASH_INPAGE,
   * and HTML5_BANNER, and all RICH_MEDIA.
   * @param htmlCode htmlCode or {@code null} for none
   */
  public Creative setHtmlCode(java.lang.String htmlCode) {
    this.htmlCode = htmlCode;
    return this;
  }

  /**
   * Whether HTML code is generated by Campaign Manager or manually entered. Set to true to ignore
   * changes to htmlCode. Applicable to the following creative types: FLASH_INPAGE and HTML5_BANNER.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getHtmlCodeLocked() {
    return htmlCodeLocked;
  }

  /**
   * Whether HTML code is generated by Campaign Manager or manually entered. Set to true to ignore
   * changes to htmlCode. Applicable to the following creative types: FLASH_INPAGE and HTML5_BANNER.
   * @param htmlCodeLocked htmlCodeLocked or {@code null} for none
   */
  public Creative setHtmlCodeLocked(java.lang.Boolean htmlCodeLocked) {
    this.htmlCodeLocked = htmlCodeLocked;
    return this;
  }

  /**
   * ID of this creative. This is a read-only, auto-generated field. Applicable to all creative
   * types.
   * @return value or {@code null} for none
   */
  public java.lang.Long getId() {
    return id;
  }

  /**
   * ID of this creative. This is a read-only, auto-generated field. Applicable to all creative
   * types.
   * @param id id or {@code null} for none
   */
  public Creative setId(java.lang.Long id) {
    this.id = id;
    return this;
  }

  /**
   * Dimension value for the ID of this creative. This is a read-only field. Applicable to all
   * creative types.
   * @return value or {@code null} for none
   */
  public DimensionValue getIdDimensionValue() {
    return idDimensionValue;
  }

  /**
   * Dimension value for the ID of this creative. This is a read-only field. Applicable to all
   * creative types.
   * @param idDimensionValue idDimensionValue or {@code null} for none
   */
  public Creative setIdDimensionValue(DimensionValue idDimensionValue) {
    this.idDimensionValue = idDimensionValue;
    return this;
  }

  /**
   * Identifies what kind of resource this is. Value: the fixed string "dfareporting#creative".
   * @return value or {@code null} for none
   */
  public java.lang.String getKind() {
    return kind;
  }

  /**
   * Identifies what kind of resource this is. Value: the fixed string "dfareporting#creative".
   * @param kind kind or {@code null} for none
   */
  public Creative setKind(java.lang.String kind) {
    this.kind = kind;
    return this;
  }

  /**
   * Creative last modification information. This is a read-only field. Applicable to all creative
   * types.
   * @return value or {@code null} for none
   */
  public LastModifiedInfo getLastModifiedInfo() {
    return lastModifiedInfo;
  }

  /**
   * Creative last modification information. This is a read-only field. Applicable to all creative
   * types.
   * @param lastModifiedInfo lastModifiedInfo or {@code null} for none
   */
  public Creative setLastModifiedInfo(LastModifiedInfo lastModifiedInfo) {
    this.lastModifiedInfo = lastModifiedInfo;
    return this;
  }

  /**
   * Latest Studio trafficked creative ID associated with rich media and VPAID creatives. This is a
   * read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.Long getLatestTraffickedCreativeId() {
    return latestTraffickedCreativeId;
  }

  /**
   * Latest Studio trafficked creative ID associated with rich media and VPAID creatives. This is a
   * read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * @param latestTraffickedCreativeId latestTraffickedCreativeId or {@code null} for none
   */
  public Creative setLatestTraffickedCreativeId(java.lang.Long latestTraffickedCreativeId) {
    this.latestTraffickedCreativeId = latestTraffickedCreativeId;
    return this;
  }

  /**
   * Name of the creative. This is a required field and must be less than 256 characters long.
   * Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Name of the creative. This is a required field and must be less than 256 characters long.
   * Applicable to all creative types.
   * @param name name or {@code null} for none
   */
  public Creative setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * Override CSS value for rich media creatives. Applicable to the following creative types: all
   * RICH_MEDIA.
   * @return value or {@code null} for none
   */
  public java.lang.String getOverrideCss() {
    return overrideCss;
  }

  /**
   * Override CSS value for rich media creatives. Applicable to the following creative types: all
   * RICH_MEDIA.
   * @param overrideCss overrideCss or {@code null} for none
   */
  public Creative setOverrideCss(java.lang.String overrideCss) {
    this.overrideCss = overrideCss;
    return this;
  }

  /**
   * The asset ID of the polite load image asset. Applicable to the creative type: DISPLAY.
   * @return value or {@code null} for none
   */
  public java.lang.Long getPoliteLoadAssetId() {
    return politeLoadAssetId;
  }

  /**
   * The asset ID of the polite load image asset. Applicable to the creative type: DISPLAY.
   * @param politeLoadAssetId politeLoadAssetId or {@code null} for none
   */
  public Creative setPoliteLoadAssetId(java.lang.Long politeLoadAssetId) {
    this.politeLoadAssetId = politeLoadAssetId;
    return this;
  }

  /**
   * Amount of time to play the video before counting a view. Applicable to the following creative
   * types: all INSTREAM_VIDEO.
   * @return value or {@code null} for none
   */
  public VideoOffset getProgressOffset() {
    return progressOffset;
  }

  /**
   * Amount of time to play the video before counting a view. Applicable to the following creative
   * types: all INSTREAM_VIDEO.
   * @param progressOffset progressOffset or {@code null} for none
   */
  public Creative setProgressOffset(VideoOffset progressOffset) {
    this.progressOffset = progressOffset;
    return this;
  }

  /**
   * URL of hosted image or hosted video or another ad tag. For INSTREAM_VIDEO_REDIRECT creatives
   * this is the in-stream video redirect URL. The standard for a VAST (Video Ad Serving Template)
   * ad response allows for a redirect link to another VAST 2.0 or 3.0 call. This is a required
   * field when applicable. Applicable to the following creative types: DISPLAY_REDIRECT,
   * INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT
   * @return value or {@code null} for none
   */
  public java.lang.String getRedirectUrl() {
    return redirectUrl;
  }

  /**
   * URL of hosted image or hosted video or another ad tag. For INSTREAM_VIDEO_REDIRECT creatives
   * this is the in-stream video redirect URL. The standard for a VAST (Video Ad Serving Template)
   * ad response allows for a redirect link to another VAST 2.0 or 3.0 call. This is a required
   * field when applicable. Applicable to the following creative types: DISPLAY_REDIRECT,
   * INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO_REDIRECT
   * @param redirectUrl redirectUrl or {@code null} for none
   */
  public Creative setRedirectUrl(java.lang.String redirectUrl) {
    this.redirectUrl = redirectUrl;
    return this;
  }

  /**
   * ID of current rendering version. This is a read-only field. Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.lang.Long getRenderingId() {
    return renderingId;
  }

  /**
   * ID of current rendering version. This is a read-only field. Applicable to all creative types.
   * @param renderingId renderingId or {@code null} for none
   */
  public Creative setRenderingId(java.lang.Long renderingId) {
    this.renderingId = renderingId;
    return this;
  }

  /**
   * Dimension value for the rendering ID of this creative. This is a read-only field. Applicable to
   * all creative types.
   * @return value or {@code null} for none
   */
  public DimensionValue getRenderingIdDimensionValue() {
    return renderingIdDimensionValue;
  }

  /**
   * Dimension value for the rendering ID of this creative. This is a read-only field. Applicable to
   * all creative types.
   * @param renderingIdDimensionValue renderingIdDimensionValue or {@code null} for none
   */
  public Creative setRenderingIdDimensionValue(DimensionValue renderingIdDimensionValue) {
    this.renderingIdDimensionValue = renderingIdDimensionValue;
    return this;
  }

  /**
   * The minimum required Flash plugin version for this creative. For example, 11.2.202.235. This is
   * a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.String getRequiredFlashPluginVersion() {
    return requiredFlashPluginVersion;
  }

  /**
   * The minimum required Flash plugin version for this creative. For example, 11.2.202.235. This is
   * a read-only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * @param requiredFlashPluginVersion requiredFlashPluginVersion or {@code null} for none
   */
  public Creative setRequiredFlashPluginVersion(java.lang.String requiredFlashPluginVersion) {
    this.requiredFlashPluginVersion = requiredFlashPluginVersion;
    return this;
  }

  /**
   * The internal Flash version for this creative as calculated by Studio. This is a read-only
   * field. Applicable to the following creative types: FLASH_INPAGE all RICH_MEDIA, and all VPAID.
   * Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getRequiredFlashVersion() {
    return requiredFlashVersion;
  }

  /**
   * The internal Flash version for this creative as calculated by Studio. This is a read-only
   * field. Applicable to the following creative types: FLASH_INPAGE all RICH_MEDIA, and all VPAID.
   * Applicable to DISPLAY when the primary asset type is not HTML_IMAGE.
   * @param requiredFlashVersion requiredFlashVersion or {@code null} for none
   */
  public Creative setRequiredFlashVersion(java.lang.Integer requiredFlashVersion) {
    this.requiredFlashVersion = requiredFlashVersion;
    return this;
  }

  /**
   * Size associated with this creative. When inserting or updating a creative either the size ID
   * field or size width and height fields can be used. This is a required field when applicable;
   * however for IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a primary asset of
   * type HTML_IMAGE, if left blank, this field will be automatically set using the actual size of
   * the associated image assets. Applicable to the following creative types: DISPLAY,
   * DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA.
   * @return value or {@code null} for none
   */
  public Size getSize() {
    return size;
  }

  /**
   * Size associated with this creative. When inserting or updating a creative either the size ID
   * field or size width and height fields can be used. This is a required field when applicable;
   * however for IMAGE, FLASH_INPAGE creatives, and for DISPLAY creatives with a primary asset of
   * type HTML_IMAGE, if left blank, this field will be automatically set using the actual size of
   * the associated image assets. Applicable to the following creative types: DISPLAY,
   * DISPLAY_IMAGE_GALLERY, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA.
   * @param size size or {@code null} for none
   */
  public Creative setSize(Size size) {
    this.size = size;
    return this;
  }

  /**
   * Amount of time to play the video before the skip button appears. Applicable to the following
   * creative types: all INSTREAM_VIDEO.
   * @return value or {@code null} for none
   */
  public VideoOffset getSkipOffset() {
    return skipOffset;
  }

  /**
   * Amount of time to play the video before the skip button appears. Applicable to the following
   * creative types: all INSTREAM_VIDEO.
   * @param skipOffset skipOffset or {@code null} for none
   */
  public Creative setSkipOffset(VideoOffset skipOffset) {
    this.skipOffset = skipOffset;
    return this;
  }

  /**
   * Whether the user can choose to skip the creative. Applicable to the following creative types:
   * all INSTREAM_VIDEO and all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getSkippable() {
    return skippable;
  }

  /**
   * Whether the user can choose to skip the creative. Applicable to the following creative types:
   * all INSTREAM_VIDEO and all VPAID.
   * @param skippable skippable or {@code null} for none
   */
  public Creative setSkippable(java.lang.Boolean skippable) {
    this.skippable = skippable;
    return this;
  }

  /**
   * Whether the creative is SSL-compliant. This is a read-only field. Applicable to all creative
   * types.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getSslCompliant() {
    return sslCompliant;
  }

  /**
   * Whether the creative is SSL-compliant. This is a read-only field. Applicable to all creative
   * types.
   * @param sslCompliant sslCompliant or {@code null} for none
   */
  public Creative setSslCompliant(java.lang.Boolean sslCompliant) {
    this.sslCompliant = sslCompliant;
    return this;
  }

  /**
   * Whether creative should be treated as SSL compliant even if the system scan shows it's not.
   * Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getSslOverride() {
    return sslOverride;
  }

  /**
   * Whether creative should be treated as SSL compliant even if the system scan shows it's not.
   * Applicable to all creative types.
   * @param sslOverride sslOverride or {@code null} for none
   */
  public Creative setSslOverride(java.lang.Boolean sslOverride) {
    this.sslOverride = sslOverride;
    return this;
  }

  /**
   * Studio advertiser ID associated with rich media and VPAID creatives. This is a read-only field.
   * Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.Long getStudioAdvertiserId() {
    return studioAdvertiserId;
  }

  /**
   * Studio advertiser ID associated with rich media and VPAID creatives. This is a read-only field.
   * Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * @param studioAdvertiserId studioAdvertiserId or {@code null} for none
   */
  public Creative setStudioAdvertiserId(java.lang.Long studioAdvertiserId) {
    this.studioAdvertiserId = studioAdvertiserId;
    return this;
  }

  /**
   * Studio creative ID associated with rich media and VPAID creatives. This is a read-only field.
   * Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.Long getStudioCreativeId() {
    return studioCreativeId;
  }

  /**
   * Studio creative ID associated with rich media and VPAID creatives. This is a read-only field.
   * Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * @param studioCreativeId studioCreativeId or {@code null} for none
   */
  public Creative setStudioCreativeId(java.lang.Long studioCreativeId) {
    this.studioCreativeId = studioCreativeId;
    return this;
  }

  /**
   * Studio trafficked creative ID associated with rich media and VPAID creatives. This is a read-
   * only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.Long getStudioTraffickedCreativeId() {
    return studioTraffickedCreativeId;
  }

  /**
   * Studio trafficked creative ID associated with rich media and VPAID creatives. This is a read-
   * only field. Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
   * @param studioTraffickedCreativeId studioTraffickedCreativeId or {@code null} for none
   */
  public Creative setStudioTraffickedCreativeId(java.lang.Long studioTraffickedCreativeId) {
    this.studioTraffickedCreativeId = studioTraffickedCreativeId;
    return this;
  }

  /**
   * Subaccount ID of this creative. This field, if left unset, will be auto-generated for both
   * insert and update operations. Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.lang.Long getSubaccountId() {
    return subaccountId;
  }

  /**
   * Subaccount ID of this creative. This field, if left unset, will be auto-generated for both
   * insert and update operations. Applicable to all creative types.
   * @param subaccountId subaccountId or {@code null} for none
   */
  public Creative setSubaccountId(java.lang.Long subaccountId) {
    this.subaccountId = subaccountId;
    return this;
  }

  /**
   * Third-party URL used to record backup image impressions. Applicable to the following creative
   * types: all RICH_MEDIA.
   * @return value or {@code null} for none
   */
  public java.lang.String getThirdPartyBackupImageImpressionsUrl() {
    return thirdPartyBackupImageImpressionsUrl;
  }

  /**
   * Third-party URL used to record backup image impressions. Applicable to the following creative
   * types: all RICH_MEDIA.
   * @param thirdPartyBackupImageImpressionsUrl thirdPartyBackupImageImpressionsUrl or {@code null} for none
   */
  public Creative setThirdPartyBackupImageImpressionsUrl(java.lang.String thirdPartyBackupImageImpressionsUrl) {
    this.thirdPartyBackupImageImpressionsUrl = thirdPartyBackupImageImpressionsUrl;
    return this;
  }

  /**
   * Third-party URL used to record rich media impressions. Applicable to the following creative
   * types: all RICH_MEDIA.
   * @return value or {@code null} for none
   */
  public java.lang.String getThirdPartyRichMediaImpressionsUrl() {
    return thirdPartyRichMediaImpressionsUrl;
  }

  /**
   * Third-party URL used to record rich media impressions. Applicable to the following creative
   * types: all RICH_MEDIA.
   * @param thirdPartyRichMediaImpressionsUrl thirdPartyRichMediaImpressionsUrl or {@code null} for none
   */
  public Creative setThirdPartyRichMediaImpressionsUrl(java.lang.String thirdPartyRichMediaImpressionsUrl) {
    this.thirdPartyRichMediaImpressionsUrl = thirdPartyRichMediaImpressionsUrl;
    return this;
  }

  /**
   * Third-party URLs for tracking in-stream video creative events. Applicable to the following
   * creative types: all INSTREAM_VIDEO and all VPAID.
   * @return value or {@code null} for none
   */
  public java.util.List<ThirdPartyTrackingUrl> getThirdPartyUrls() {
    return thirdPartyUrls;
  }

  /**
   * Third-party URLs for tracking in-stream video creative events. Applicable to the following
   * creative types: all INSTREAM_VIDEO and all VPAID.
   * @param thirdPartyUrls thirdPartyUrls or {@code null} for none
   */
  public Creative setThirdPartyUrls(java.util.List<ThirdPartyTrackingUrl> thirdPartyUrls) {
    this.thirdPartyUrls = thirdPartyUrls;
    return this;
  }

  /**
   * List of timer events configured for the creative. For DISPLAY_IMAGE_GALLERY creatives, these
   * are read-only and auto-generated from clickTags. Applicable to the following creative types:
   * DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
   * asset is not HTML_IMAGE.
   * @return value or {@code null} for none
   */
  public java.util.List<CreativeCustomEvent> getTimerCustomEvents() {
    return timerCustomEvents;
  }

  /**
   * List of timer events configured for the creative. For DISPLAY_IMAGE_GALLERY creatives, these
   * are read-only and auto-generated from clickTags. Applicable to the following creative types:
   * DISPLAY_IMAGE_GALLERY, all RICH_MEDIA, and all VPAID. Applicable to DISPLAY when the primary
   * asset is not HTML_IMAGE.
   * @param timerCustomEvents timerCustomEvents or {@code null} for none
   */
  public Creative setTimerCustomEvents(java.util.List<CreativeCustomEvent> timerCustomEvents) {
    this.timerCustomEvents = timerCustomEvents;
    return this;
  }

  /**
   * Combined size of all creative assets. This is a read-only field. Applicable to the following
   * creative types: all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.Long getTotalFileSize() {
    return totalFileSize;
  }

  /**
   * Combined size of all creative assets. This is a read-only field. Applicable to the following
   * creative types: all RICH_MEDIA, and all VPAID.
   * @param totalFileSize totalFileSize or {@code null} for none
   */
  public Creative setTotalFileSize(java.lang.Long totalFileSize) {
    this.totalFileSize = totalFileSize;
    return this;
  }

  /**
   * Type of this creative. This is a required field. Applicable to all creative types.
   *
   * Note: FLASH_INPAGE, HTML5_BANNER, and IMAGE are only used for existing creatives. New creatives
   * should use DISPLAY as a replacement for these types.
   * @return value or {@code null} for none
   */
  public java.lang.String getType() {
    return type;
  }

  /**
   * Type of this creative. This is a required field. Applicable to all creative types.
   *
   * Note: FLASH_INPAGE, HTML5_BANNER, and IMAGE are only used for existing creatives. New creatives
   * should use DISPLAY as a replacement for these types.
   * @param type type or {@code null} for none
   */
  public Creative setType(java.lang.String type) {
    this.type = type;
    return this;
  }

  /**
   * A Universal Ad ID as per the VAST 4.0 spec. Applicable to the following creative types:
   * INSTREAM_VIDEO and VPAID.
   * @return value or {@code null} for none
   */
  public UniversalAdId getUniversalAdId() {
    return universalAdId;
  }

  /**
   * A Universal Ad ID as per the VAST 4.0 spec. Applicable to the following creative types:
   * INSTREAM_VIDEO and VPAID.
   * @param universalAdId universalAdId or {@code null} for none
   */
  public Creative setUniversalAdId(UniversalAdId universalAdId) {
    this.universalAdId = universalAdId;
    return this;
  }

  /**
   * The version number helps you keep track of multiple versions of your creative in your reports.
   * The version number will always be auto-generated during insert operations to start at 1. For
   * tracking creatives the version cannot be incremented and will always remain at 1. For all other
   * creative types the version can be incremented only by 1 during update operations. In addition,
   * the version will be automatically incremented by 1 when undergoing Rich Media creative merging.
   * Applicable to all creative types.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getVersion() {
    return version;
  }

  /**
   * The version number helps you keep track of multiple versions of your creative in your reports.
   * The version number will always be auto-generated during insert operations to start at 1. For
   * tracking creatives the version cannot be incremented and will always remain at 1. For all other
   * creative types the version can be incremented only by 1 during update operations. In addition,
   * the version will be automatically incremented by 1 when undergoing Rich Media creative merging.
   * Applicable to all creative types.
   * @param version version or {@code null} for none
   */
  public Creative setVersion(java.lang.Integer version) {
    this.version = version;
    return this;
  }

  /**
   * Description of the video ad. Applicable to the following creative types: all INSTREAM_VIDEO and
   * all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.String getVideoDescription() {
    return videoDescription;
  }

  /**
   * Description of the video ad. Applicable to the following creative types: all INSTREAM_VIDEO and
   * all VPAID.
   * @param videoDescription videoDescription or {@code null} for none
   */
  public Creative setVideoDescription(java.lang.String videoDescription) {
    this.videoDescription = videoDescription;
    return this;
  }

  /**
   * Creative video duration in seconds. This is a read-only field. Applicable to the following
   * creative types: INSTREAM_VIDEO, all RICH_MEDIA, and all VPAID.
   * @return value or {@code null} for none
   */
  public java.lang.Float getVideoDuration() {
    return videoDuration;
  }

  /**
   * Creative video duration in seconds. This is a read-only field. Applicable to the following
   * creative types: INSTREAM_VIDEO, all RICH_MEDIA, and all VPAID.
   * @param videoDuration videoDuration or {@code null} for none
   */
  public Creative setVideoDuration(java.lang.Float videoDuration) {
    this.videoDuration = videoDuration;
    return this;
  }

  @Override
  public Creative set(String fieldName, Object value) {
    return (Creative) super.set(fieldName, value);
  }

  @Override
  public Creative clone() {
    return (Creative) super.clone();
  }

}


text:
using namespace llvm;

#define DEBUG_TYPE "xfer"

namespace llvm {
  void initializeHexagonSplitTFRCondSetsPass(PassRegistry&);
}

namespace {

class HexagonSplitTFRCondSets : public MachineFunctionPass {
 public:
    static char ID;
    HexagonSplitTFRCondSets() : MachineFunctionPass(ID) {
      initializeHexagonSplitTFRCondSetsPass(*PassRegistry::getPassRegistry());
    }

    const char *getPassName() const override {
      return "Hexagon Split TFRCondSets";
    }
    bool runOnMachineFunction(MachineFunction &Fn) override;
};

char HexagonSplitTFRCondSets::ID = 0;

bool HexagonSplitTFRCondSets::runOnMachineFunction(MachineFunction &Fn) {

  const TargetInstrInfo *TII = Fn.getSubtarget().getInstrInfo();

  // Loop over all of the basic blocks.
  for (MachineFunction::iterator MBBb = Fn.begin(), MBBe = Fn.end();
       MBBb != MBBe; ++MBBb) {
    MachineBasicBlock* MBB = MBBb;
    // Traverse the basic block.
    for (MachineBasicBlock::iterator MII = MBB->begin(); MII != MBB->end();
         ++MII) {
      MachineInstr *MI = MII;
      switch(MI->getOpcode()) {
        case Hexagon::TFR_condset_ri: {
          int DestReg = MI->getOperand(0).getReg();
          int SrcReg1 = MI->getOperand(2).getReg();

          //  Do not emit the predicated copy if the source and the destination
          // is the same register.
          if (DestReg != SrcReg1) {
            BuildMI(*MBB, MII, MI->getDebugLoc(),
              TII->get(Hexagon::A2_tfrt), DestReg).
              addReg(MI->getOperand(1).getReg()).addReg(SrcReg1);
          }
          BuildMI(*MBB, MII, MI->getDebugLoc(),
            TII->get(Hexagon::C2_cmoveif), DestReg).
            addReg(MI->getOperand(1).getReg()).
            addImm(MI->getOperand(3).getImm());

          MII = MBB->erase(MI);
          --MII;
          break;
        }
        case Hexagon::TFR_condset_ir: {
          int DestReg = MI->getOperand(0).getReg();
          int SrcReg2 = MI->getOperand(3).getReg();

          BuildMI(*MBB, MII, MI->getDebugLoc(),
            TII->get(Hexagon::C2_cmoveit), DestReg).
            addReg(MI->getOperand(1).getReg()).
            addImm(MI->getOperand(2).getImm());

          // Do not emit the predicated copy if the source and
          // the destination is the same register.
          if (DestReg != SrcReg2) {
            BuildMI(*MBB, MII, MI->getDebugLoc(),
              TII->get(Hexagon::A2_tfrf), DestReg).
              addReg(MI->getOperand(1).getReg()).addReg(SrcReg2);
          }
          MII = MBB->erase(MI);
          --MII;
          break;
        }
        case Hexagon::TFR_condset_ii: {
          int DestReg = MI->getOperand(0).getReg();
          int SrcReg1 = MI->getOperand(1).getReg();

          int Immed1 = MI->getOperand(2).getImm();
          int Immed2 = MI->getOperand(3).getImm();
          BuildMI(*MBB, MII, MI->getDebugLoc(),
                  TII->get(Hexagon::C2_cmoveit),
                  DestReg).addReg(SrcReg1).addImm(Immed1);
          BuildMI(*MBB, MII, MI->getDebugLoc(),
                  TII->get(Hexagon::C2_cmoveif),
                  DestReg).addReg(SrcReg1).addImm(Immed2);
          MII = MBB->erase(MI);
          --MII;
          break;
        }
      }
    }
  }
  return true;
}

}

//===----------------------------------------------------------------------===//
//                         Public Constructor Functions
//===----------------------------------------------------------------------===//

static void initializePassOnce(PassRegistry &Registry) {
  const char *Name = "Hexagon Split TFRCondSets";
  PassInfo *PI = new PassInfo(Name, "hexagon-split-tfr",
                              &HexagonSplitTFRCondSets::ID, nullptr, false,
                              false);
  Registry.registerPass(*PI, true);
}

void llvm::initializeHexagonSplitTFRCondSetsPass(PassRegistry &Registry) {
  CALL_ONCE_INITIALIZATION(initializePassOnce)
}

FunctionPass *llvm::createHexagonSplitTFRCondSets() {
  return new HexagonSplitTFRCondSets();
}

redpajama_set_name: RedPajamaGithub


text:
FactoryGirl.define do
  factory :picture do
    url "MyString"
source "MyString"
  end

end


text:
'use strict';

angular.module('mean.adoptions').config(['$stateProvider',
  function($stateProvider) {
    // Check if the user is connected
    var checkLoggedin = function($q, $timeout, $http, $location) {
      // Initialize a new promise
      var deferred = $q.defer();

      // Make an AJAX call to check if the user is logged in
      $http.get('/loggedin').success(function(user) {
        // Authenticated
        if (user !== '0') $timeout(deferred.resolve);

        // Not Authenticated
        else {
          $timeout(deferred.reject);
          $location.url('/login');
        }
      });

      return deferred.promise;
    };

    $stateProvider
      .state('adoptions example page', {
        url: '/adoptions/example',
        templateUrl: 'adoptions/views/index.html'
      })
      .state('all adoptions', {
        url: '/adoptions',
        templateUrl: 'adoptions/views/list.html',
        resolve: {
          loggedin: checkLoggedin
        }
      })
      .state('create adoption', {
        url: '/adoptions/create',
        templateUrl: 'adoptions/views/create.html',
        resolve: {
          loggedin: checkLoggedin
        }
      })
      .state('edit adoption', {
        url: '/adoptions/:adoptionId/edit',
        templateUrl: 'adoptions/views/edit.html',
        resolve: {
          loggedin: checkLoggedin
        }
      })
      .state('adoption by id', {
        url: '/adoptions/:adoptionId',
        templateUrl: 'adoptions/views/view.html',
        resolve: {
          loggedin: checkLoggedin
        }
      });
  }
]);


text:
<?php

include '../../bootstrap.php';

use Tester\Assert;
use App\Helpers\EvaluationResults\EvaluationTaskResult;
use App\Helpers\EvaluationResults\SandboxResults;
use App\Exceptions\ResultsLoadingException;

/**
 * @testCase
 */
class TestEvaluationTask extends Tester\TestCase
{

    public function testMissingRequiredParams()
    {
        Assert::exception(
            function () {
                new EvaluationTaskResult([]);
            },
            ResultsLoadingException::class
        );
        Assert::exception(
            function () {
                new EvaluationTaskResult(['task-id' => 'ABC']);
            },
            ResultsLoadingException::class
        );
        Assert::exception(
            function () {
                new EvaluationTaskResult(['status' => 'XYZ']);
            },
            ResultsLoadingException::class
        );
        Assert::noError(
            function () {
                new EvaluationTaskResult(['task-id' => 'ABC', 'status' => 'XYZ', 'output' => null]);
            }
        );
        Assert::noError(
            function () {
                new EvaluationTaskResult(['task-id' => 'ABC', 'status' => 'XYZ', 'output' => ""]);
            }
        );
        Assert::noError(
            function () {
                new EvaluationTaskResult(['task-id' => 'ABC', 'status' => 'XYZ', 'output' => "123"]);
            }
        );
    }

    public function testParsingParams()
    {
        $result = new EvaluationTaskResult(
            ['task-id' => 'ABC', 'status' => 'XYZ', 'output' => ["stdout" => "1.0\n123", "stderr" => "456"]]
        );
        Assert::same("ABC", $result->getId());
        Assert::same("XYZ", $result->getStatus());
        Assert::equal("123", $result->getStdout());
        Assert::equal("456", $result->getStderr());
        Assert::equal("123\n456", $result->getOutput());
    }

    public function testScoreCalculation()
    {
        $judgeToScore = [
            "abc" => 0.0,
            "a" => 0.0,
            "abc 1.0" => 0.0,
            "0.123" => 0.123,
            "0.456000" => 0.456,
            "0.456000\nHello world" => 0.456,
            "0.456000\twhoosh" => 0.456,
            "0.123 ahoj" => 0.123,
            "123" => 1.0,
            "-0.123" => 0.0,
            "" => 0.0,
            "FALSE" => 0.0,
            "TRUE" => 0.0
        ];

        foreach ($judgeToScore as $judgeOutput => $score) {
            $result = new EvaluationTaskResult(
                ['task-id' => 'ABC', 'status' => 'XYZ', 'output' => ["stdout" => $judgeOutput]]
            );
            Assert::same($score, $result->getScore());
        }
    }
}

# Testing methods run
$testCase = new TestEvaluationTask();
$testCase->run();


text:
using System;
using NUnit.Framework;

public class Test15
{

    [TestCase]
    public void ChangeCardType_On_NonExistingTranasction_ShouldThrow()
    {
        //Arrange
        IArena RA = new RoyaleArena();
        //Act
        //Assert
        Assert.Throws<ArgumentException>(
            () => RA.ChangeCardType(6, CardType.RANGED)
        );
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>AuthCacheMBean (apache-cassandra API)</title>
<meta name="date" content="2016-04-13">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.apache.cassandra.auth

Interface AuthCacheMBean

All Known Subinterfaces:

PasswordAuthenticator.CredentialsCacheMBean, PermissionsCacheMBean, RolesCacheMBean

All Known Implementing Classes:

AuthCache, PermissionsCache, RolesCache

public interface AuthCacheMBean

Method Summary

All Methods Instance Methods Abstract Methods

Modifier and Type
Method and Description

int
getMaxEntries()

int
getUpdateInterval()

int
getValidity()

void
invalidate()

void
setMaxEntries(int maxEntries)

void
setUpdateInterval(int updateInterval)

void
setValidity(int validityPeriod)

Method Detail

invalidate

void invalidate()

setValidity

void setValidity(int validityPeriod)

getValidity

int getValidity()

setUpdateInterval

void setUpdateInterval(int updateInterval)

getUpdateInterval

int getUpdateInterval()

setMaxEntries

void setMaxEntries(int maxEntries)

getMaxEntries

int getMaxEntries()

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2016 The Apache Software Foundation


text:
using System;
using System.Threading;
using socketSrv;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Text;
using ServerExperiment;

namespace peer
{
	public class fileTransport
	{
		public void getFile (object data)
		{
            Console.WriteLine("in fileTransport - get file");
			socketSrv.commandMessage cmd = (socketSrv.commandMessage)data;
			IPEndPoint iep = new IPEndPoint(IPAddress.Any, cmd.port);
			TcpListener server = new TcpListener(iep);
			server.ExclusiveAddressUse = true;
			server.Start();
			TcpClient tcpFIleNetClient = server.AcceptTcpClient();

			//IPAddress remoteMachine = IPAddress.Parse(tcpFIleNetClient.Client.RemoteEndPoint.ToString());

			//Console.WriteLine("\n{0} Connected.  Starting file transfer\n", remoteMachine);

			byte [] buffer = new byte[1500];

			NetworkStream fileNetStream = tcpFIleNetClient.GetStream();
			int numBytes = fileNetStream.Read(buffer, 0, 1500);

			byte [] messageSizeBytes = new byte[4];
            byte[] addressBytes = new byte[4];
            byte[] portBytes = new byte[4];
			byte [] cmdBytes = new byte[4];
			byte [] fileSizeBytes = new byte[4];
			byte [] fileNameSizeBytes = new byte[4];

			int messageSize, fileSize, fileNameSize, cmdNum;
			string fileName;

			System.Buffer.BlockCopy(buffer, 0, messageSizeBytes, 0, 4);
            System.Buffer.BlockCopy(buffer, 4, addressBytes, 0, 4);
            System.Buffer.BlockCopy(buffer, 8, portBytes, 0, 4);
			System.Buffer.BlockCopy(buffer, 12, cmdBytes, 0, 4);
			System.Buffer.BlockCopy(buffer, 16, fileSizeBytes, 0, 4);
			System.Buffer.BlockCopy(buffer, 20, fileNameSizeBytes, 0, 4);

			messageSize = BitConverter.ToInt32(messageSizeBytes,0);
			fileSize = BitConverter.ToInt32(fileSizeBytes, 0);
            UTF8Encoding utf8 = new UTF8Encoding();

            fileNameSize = BitConverter.ToInt32(fileNameSizeBytes, 0);
			cmdNum = BitConverter.ToInt32(cmdBytes,0);
			if (cmdNum != cmd.command)
			{
				//lucy we have a problem
				//bugbug
			}
            byte[] fileNameBytes = new byte[fileNameSize];
			System.Buffer.BlockCopy(buffer, 24, fileNameBytes, 0, fileNameSize);

			fileName = utf8.GetString(fileNameBytes);

			int bytesLeft = (24 + fileNameSize + fileSize);
            BinaryWriter fs = new BinaryWriter(File.Open(cmd.fileDir + "/" + fileName, FileMode.CreateNew));

            fs.Write(buffer, 24 + fileNameSize, numBytes - (24 + fileNameSize));

            int recBytes = numBytes;

            while (recBytes < bytesLeft)  //may need messageSize here
			{
                numBytes = fileNetStream.Read(buffer, 0, 1500);
                fs.Write(buffer, 0, numBytes);
                recBytes += numBytes;
                Console.Write("*");
			}
            fs.Close();

            Console.WriteLine("\nFile transfer complete. {0} bytes written\n", recBytes);

			fileNetStream.Close();
			tcpFIleNetClient.Close();
            Program.p2p.refreshFileList(cmd.fileDir);
            //p2p.refreshFileList(cmd.fileDir);
		}

		public void sendFile (object data)
		{
			Console.WriteLine("in file transport - send file");

			socketSrv.commandMessage cmd = (socketSrv.commandMessage)data;

			Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);

			IPEndPoint iep = new IPEndPoint(cmd.peerIP, cmd.port);
			sock.Connect(iep);
			//TcpClient tcpSendFile = new TcpClient(iep);
			NetworkStream netStream = new NetworkStream(sock);

			byte [] messageSizeBytes = new byte[4];
			byte [] addressBytes = new byte[4];
			byte [] portBytes = new byte[4];
			byte [] cmdBytes = new byte[4];
			byte [] fileSizeBytes = new byte[4];
			byte [] fileNameSizeBytes = new byte[4];
			byte [] fileNameBytes = new byte[255];
			byte[] buffer = new byte[1500];
			int messageSize, fileSize, fileNameSize, bufCnt;
			string fileName;

			FileInfo fi1 = new FileInfo(cmd.fileName);
			if (fi1.Exists)
			{
				fileSize = (int)fi1.Length;
				fileName = fi1.Name;
				fileNameSize = fileName.Length;
			}
			else
				return;

			bufCnt = 0;

			messageSizeBytes = BitConverter.GetBytes(0);
			System.Buffer.BlockCopy(messageSizeBytes, 0, buffer, 0,  4);
			bufCnt += 4;

			addressBytes = cmd.peerIP.GetAddressBytes();
			System.Buffer.BlockCopy(addressBytes, 0, buffer, bufCnt, 4);
			bufCnt += 4;

			portBytes = BitConverter.GetBytes(cmd.port);
			System.Buffer.BlockCopy(portBytes, 0, buffer, bufCnt, 4);
			bufCnt += 4;

			cmdBytes = BitConverter.GetBytes(cmd.command);
			System.Buffer.BlockCopy(cmdBytes, 0, buffer, bufCnt, 4);
			bufCnt += 4;

			fileSizeBytes = BitConverter.GetBytes(fileSize);
			System.Buffer.BlockCopy(fileSizeBytes, 0, buffer, bufCnt, 4);
			bufCnt += 4;

			UTF8Encoding encoder = new UTF8Encoding();

			fileNameSize = encoder.GetByteCount(fileName);

			fileNameSizeBytes = BitConverter.GetBytes(fileNameSize);
			System.Buffer.BlockCopy(fileNameSizeBytes, 0, buffer, bufCnt, 4);
			bufCnt += 4;

			fileNameBytes = encoder.GetBytes(fileName);
			System.Buffer.BlockCopy(fileNameBytes, 0, buffer, bufCnt, fileNameSize);
			bufCnt += fileNameSize;
            int totalByteCnt = bufCnt;
			using (BinaryReader fs = new BinaryReader(File.Open(cmd.fileName, FileMode.Open)))
	        {
	            int readCnt = fs.Read(buffer,bufCnt,buffer.Length-bufCnt);
                messageSizeBytes = BitConverter.GetBytes(bufCnt);
                System.Buffer.BlockCopy(messageSizeBytes, 0, buffer, 0, 4);
	            while (readCnt > 0)
	            {
					bufCnt += readCnt;
                    totalByteCnt += readCnt;
                    Console.Write("*");
					netStream.Write(buffer,0,bufCnt);
					bufCnt = 0;
					readCnt = fs.Read(buffer,bufCnt,buffer.Length);
	            }
	        }
            Console.WriteLine("File sent.  {0} bytes put on wire.", totalByteCnt);
			netStream.Close();
			sock.Close();
			return;
		}
	}
}


text:
<?php

namespace Habu\Tests\ComposerScriptUtils\Configuration\Handler;

use Habu\ComposerScriptUtils\Configuration\Handler\DefaultValue;

class DefaultValueTest extends \PHPUnit_Framework_TestCase
{
    public function testDefaultValueHandler()
    {
        $handler = new DefaultValue('test');

        // Assert that empty values return the default value
        // attached to the handler.
        $this->assertEquals('test', $handler->get(null));
        $this->assertEquals('test', $handler->get(false));
        $this->assertEquals('test', $handler->get([]));

        // Assert that non-empty values return the
        // provided value.
        $this->assertEquals('bla', $handler->get('bla'));
        $this->assertEquals('0', $handler->get('0'));
    }
}


text:
RSpec::Matchers.define :convert do |value|
  match do |converter_class|
    @errors         = []
    converter       = converter_class.new(value)
    converted_value = converter.convert

    unless instance_variable_defined?('@expected_value')
      @expected_value = begin
        @record.send("#{@attribute}=", value)
        @record.send(@attribute)
      end
    end

    if converted_value != @expected_value
      message = "Expected #{converter_class}"
      message += "\n  to convert #{value.inspect} to #{@expected_value.inspect}"
      message += ",\n  but actual output was #{converted_value.inspect}"
      @errors << message
    end

    @errors.empty?
  end

  chain :to do |expected_value|
    @expected_value = expected_value
  end

  chain :similar_to do |record|
    @record = record
  end

  chain :on do |attribute|
    @attribute = attribute
  end

  failure_message do
    @errors.join("\n")
  end
end


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#pragma once

#include "pal_types.h"
#include "pal_compiler.h"

#include <Security/Security.h>

/*
Get a CFRetain()ed SecKeychainRef value for the keychain to which the keychain item belongs.

The behavior of this function is undefined if `item` is not a CFTypeRef.
For types that are not understood by this function to be keychain items an invalid parameter error is returned.
Errors of the item having no keychain are suppressed, returning success (0) with *pKeychainOut set to NULL.

For all other situations, see SecKeychainItemCopyKeychain documentation.
*/
DLLEXPORT int32_t AppleCryptoNative_SecKeychainItemCopyKeychain(SecKeychainItemRef item, SecKeychainRef* pKeychainOut);

/*
Create a keychain at the specified location with a given (UTF-8 encoded) lock passphrase.

Returns the result of SecKeychainCreate.

Output:
pKeychainOut: The SecKeychainRef created by this function
*/
DLLEXPORT int32_t AppleCryptoNative_SecKeychainCreate(const char* pathName,
                                                      uint32_t passphraseLength,
                                                      const uint8_t* passphraseUtf8,
                                                      SecKeychainRef* pKeychainOut);

/*
Delete a keychain, including the file on disk.

Returns the result of SecKeychainDelete
*/
DLLEXPORT int32_t AppleCryptoNative_SecKeychainDelete(SecKeychainRef keychain);

/*
Open the default keychain.
This is usually login.keychain, but can be adjusted by the user.

Returns the result of SecKeychainCopyDefault.

Output:
pKeyChainOut: Receives the SecKeychainRef for the default keychain.
*/
DLLEXPORT int32_t AppleCryptoNative_SecKeychainCopyDefault(SecKeychainRef* pKeychainOut);

/*
Open the named keychain (full path to the file).

Returns the result of SecKeychainOpen.

Output:
pKeychainOut: Receives the SecKeychainRef for the named keychain.
*/
DLLEXPORT int32_t AppleCryptoNative_SecKeychainOpen(const char* pszKeychainPath, SecKeychainRef* pKeychainOut);

/*
Unlock an opened keychain with a given (UTF-8 encoded) lock passphrase.

Returns the result of SecKeychainUnlock.
*/
DLLEXPORT int32_t AppleCryptoNative_SecKeychainUnlock(SecKeychainRef keychain,
                                                      uint32_t passphraseLength,
                                                      const uint8_t* passphraseUtf8);

/*
Set a keychain to never (automatically) lock.

Returns the result of SecKeychainSetSettings to a never-auto-lock policy.
*/
DLLEXPORT int32_t AppleCryptoNative_SetKeychainNeverLock(SecKeychainRef keychain);

/*
Enumerate the certificate objects within the given keychain.

Returns 1 on success (including "no certs found"), 0 on failure, any other value for invalid state.

Output:
pCertsOut: When the return value is not 1, NULL. Otherwise NULL on "no certs found", or a CFArrayRef for the matches
(including a single match).
pOSStatus: Receives the last OSStatus value.
*/
DLLEXPORT int32_t
AppleCryptoNative_SecKeychainEnumerateCerts(SecKeychainRef keychain, CFArrayRef* pCertsOut, int32_t* pOSStatus);

/*
Enumerate the certificate objects within the given keychain.

Returns 1 on success (including "no certs found"), 0 on failure, any other value for invalid state.

Note that any identity will also necessarily be returned as a certificate with no private key by
SecKeychainEnumerateCerts.  De-duplication of values is the responsibility of the caller.

Output:
pCertsOut: When the return value is not 1, NULL. Otherwise NULL on "no certs found", or a CFArrayRef for the matches
(including a single match).
pOSStatus: Receives the last OSStatus value.
*/
DLLEXPORT int32_t AppleCryptoNative_SecKeychainEnumerateIdentities(SecKeychainRef keychain,
                                                                   CFArrayRef* pIdentitiesOut,
                                                                   int32_t* pOSStatus);

/*
Add a certificate from the specified keychain.

Returns
0 on failure -> see OSStatus
1 on success
any other value is invalid

Output:
pOSStatus: Receives the last OSStatus value..
*/
DLLEXPORT int32_t
AppleCryptoNative_X509StoreAddCertificate(CFTypeRef certOrIdentity, SecKeychainRef keychain, int32_t* pOSStatus);

/*
Remove a certificate from the specified keychain.

Returns
0 on failure -> see OSStatus
1 on success (including no item to delete),
2 on blocking user trust modification,
3 on blocking system trust modification,
any other value is invalid

Output:
pOSStatus: Receives the last OSStatus value..
*/
DLLEXPORT int32_t
AppleCryptoNative_X509StoreRemoveCertificate(CFTypeRef certOrIdentity, SecKeychainRef keychain, int32_t* pOSStatus);


text:
<?php defined('SYSPATH') or die('No direct access allowed.');

$lang = array
(
    'file_not_found' => 'Le fichier spécifié, %s, est introuvable. Merci de vérifier que les fichiers existent, grâce à la fontion file_exists, avant de les utiliser.',
    'requires_GD2'   => 'La librairie Captcha requiert GD2 avec le support FreeType installé. Voir http://php.net/gd_info pour de plus amples renseignements, merci.',
);