<commit_before>/*
    Copyright 2016-17 IBM Corp.
    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.
*/

package com.ibm.mobilefirstplatform.clientsdk.android.push.internal;

import android.content.Intent;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import com.ibm.mobilefirstplatform.clientsdk.android.logger.api.Logger;
import org.json.JSONException;
import org.json.JSONObject;

/**
 *
 * Represents message received from Push Server via GCM
 * Its visibility is restricted to package level since it will be used by the sdk internally
 * to store the push received before it can be passed to Jane.
 */
public class MFPInternalPushMessage implements Parcelable, MFPPushMessage {

	private static final String GCM_EXTRA_ID = "nid";
	private static final String GCM_EXTRA_ALERT = "alert";
	private static final String GCM_EXTRA_PAYLOAD = "payload";
	private static final String GCM_EXTRA_URL = "url";
	private static final String GCM_EXTRA_MID = "mid";
	private static final String GCM_EXTRA_TYPE = "type";
	private static final String GCM_EXTRA_SOUND = "sound";
	private static final String GCM_EXTRA_BRIDGE = "bridge";
	private static final String GCM_EXTRA_VISIBILITY = "visibility";
	private static final String GCM_EXTRA_PRIORITY = "priority";
	private static final String GCM_EXTRA_REDACT = "redact";
	private static final String GCM_EXTRA_CATEGORY = "category";
	private static final String GCM_EXTRA_KEY = "key";
	private static final String GCM_EXTRA_NOTIFICATIONID = "notificationId";
	private static final String GCM_EXTRA_STYLE = "gcmstyle";
	private static final String GCM_EXTRA_ICONNAME = "iconName";

	public static final String LOG_TAG = "PushMessage";

	private String id = null;
	private String url = null;
	private String alert = null;
	private String payload = null;
	private String mid = null;
	private String sound = null;
	private boolean bridge = true;
	private String priority = null;
	private String visibility = null;
	private String redact = null;
	private String key = null;
	private String category = null;<commit_msg>refactor gcmStyle to style<commit_after>/*
    Copyright 2016-17 IBM Corp.
    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.
*/

package com.ibm.mobilefirstplatform.clientsdk.android.push.internal;

import android.content.Intent;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import com.ibm.mobilefirstplatform.clientsdk.android.logger.api.Logger;
import org.json.JSONException;
import org.json.JSONObject;

/**
 *
 * Represents message received from Push Server via GCM
 * Its visibility is restricted to package level since it will be used by the sdk internally
 * to store the push received before it can be passed to Jane.
 */
public class MFPInternalPushMessage implements Parcelable, MFPPushMessage {

	private static final String GCM_EXTRA_ID = "nid";
	private static final String GCM_EXTRA_ALERT = "alert";
	private static final String GCM_EXTRA_PAYLOAD = "payload";
	private static final String GCM_EXTRA_URL = "url";
	private static final String GCM_EXTRA_MID = "mid";
	private static final String GCM_EXTRA_TYPE = "type";
	private static final String GCM_EXTRA_SOUND = "sound";
	private static final String GCM_EXTRA_BRIDGE = "bridge";
	private static final String GCM_EXTRA_VISIBILITY = "visibility";
	private static final String GCM_EXTRA_PRIORITY = "priority";
	private static final String GCM_EXTRA_REDACT = "redact";
	private static final String GCM_EXTRA_CATEGORY = "category";
	private static final String GCM_EXTRA_KEY = "key";
	private static final String GCM_EXTRA_NOTIFICATIONID = "notificationId";
	private static final String GCM_EXTRA_STYLE = "style";
	private static final String GCM_EXTRA_ICONNAME = "iconName";

	public static final String LOG_TAG = "PushMessage";

	private String id = null;
	private String url = null;
	private String alert = null;
	private String payload = null;
	private String mid = null;
	private String sound = null;
	private boolean bridge = true;
	private String priority = null;
	private String visibility = null;
	private String redact = null;
	private String key = null;
	private String category = null;
{'fraction_non_alphanumeric': 0.06540977298961138, 'fraction_numerical': 0.003847633705271258, 'mean_word_length': 4.688183807439825, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4447245', 'n_tokens_mistral': 1567, 'n_tokens_neox': 1479, 'n_words': 584}