text:
(function($) {
	window.Footer = Backbone.Model.extend({
		"url": "/assets/footer.json"
	});

	window.FlickrPhotoset = Backbone.Model.extend({});

	window.Photosets = Backbone.Model.extend({
		url: 'http://api.flickr.com/services/rest/?method=flickr.photosets.getList&format=json&api_key=MY_API_KEY_HERE&user_id=MY_USER_ID_HERE&nojsoncallback=1',
		photosPerSet: [],
		initialize: function() {
			_.bindAll(this, 'getId', 'getSize', 'fetchPhotos', 'getTitle', 'getDescription');

			this.bind('change', this.fetchPhotos);
		},
		getId: function(index) {
			return this.attributes.photosets.photoset[index].id;
		},
		getTitle: function(index) {
			return this.attributes.photosets.photoset[index].title._content;
		},
		getDescription: function(index) {
			return this.attributes.photosets.photoset[index].description._content;
		},
		getSize: function() {
			return this.attributes.photosets.photoset.length;
		},
		fetchPhotos: function() {
			for (i = 0; i < this.getSize(); i++) {
				this.photosPerSet.push(new window.PhotosOfPhotoset({
					setTitle: this.getTitle(i),
					setDescription: this.getDescription(i)
				}));

				this.photosPerSet[i].setPhotoSetId(this.getId(i));
				if (i === (this.getSize() - 1)) {
					this.photosPerSet[i].setLast(true);
				}
				this.photosPerSet[i].fetch();
			}
		}
	});

	window.PhotosOfPhotoset = Backbone.Model.extend({
		last: false,
		photosetId: 0,
		initialize: function() {
			_.bindAll(this, 'url', 'setPhotoSetId', 'getSize', 'getPhotoUrl', 'update', 'setLast', 'getPhotoTitle');
			this.bind('change', this.update);
		},
		url: function() {
			return 'http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&format=json&api_key=beda8cbda2554c1da125362dcf86eab2&user_id=79009288@N07&photoset_id=' + this.photosetId + '&extras=url_l&nojsoncallback=1';
		},
		setLast: function(isLast) {
			this.last = isLast;
		},
		setPhotoSetId: function(newId) {
			this.photosetId = newId;
		},
		getSize: function() {
			if (this.attributes.photoset) {
				return this.attributes.photoset.photo.length;
			} else {
				return 0;
			}
		},
		getPhotoTitle: function(index) {
			return this.attributes.photoset.photo[index].title;
		},
		getPhotoUrl: function(index) {
			return this.attributes.photoset.photo[index].url_l;
		},
		update: function() {
			var projectCache = {
				id: this.photosetId,
				title: this.attributes.setTitle,
				description: this.attributes.setDescription,
				images: []
			};

			for (k = 0; k < this.getSize(); k++) {
				projectCache.images.push({
					id: k,
					title: this.getPhotoTitle(k),
					description: this.attributes.setDescription,
					url: this.getPhotoUrl(k)
				});
			}
			window.projectItems.push(new SelectableItem(projectCache));
		}
	});

	window.TextSection = Backbone.Model.extend({});

	window.ResumeSection = Backbone.Model.extend({});

	window.Resume = Backbone.Collection.extend({
		model: ResumeSection,
		url: '/assets/resume.json'
	});

	window.Writings = Backbone.Collection.extend({
		model: TextSection,
		url: '/assets/writings.json'
	});

	window.SelectableItem = Backbone.Model.extend({
		selected: false,
		initialize: function() {
			_.bindAll(this, 'select', 'unSelect', 'isSelected');
		},
		select: function() {
			this.selected = true;
			this.trigger('change');
			this.trigger('select');
		},
		unSelect: function() {
			this.selected = false;
			this.trigger('change');
			this.trigger('unSelect');
		},
		isSelected: function() {
			return this.selected;
		}
	});

	window.SelectableItems = Backbone.Collection.extend({
		model: SelectableItem
	});

	window.ProjectItems = SelectableItems.extend({
		comparator: function(o1, o2) {
			return o1.attributes.id < o2.attributes.id;
		}
	});

	window.SelectableModel = Backbone.Model.extend({
		currentItemIndex: 0,
		initialize: function() {
			_.bindAll(this, 'select', 'getcurrentItemIndex', 'getItems', 'next', 'previous');
			this.bind('select', this.select);
			this.bind('change', this.selectFirst);

			this.items = this.attributes.items;
		},
		select: function(item) {
			if (item.attributes.url) {
				window.open(item.attributes.url, '_blank');
			} else {
				this.items.at(this.getcurrentItemIndex()).unSelect();
				item.select();
				this.currentItemIndex = this.items.indexOf(item);
				this.trigger('selected', this.currentItemIndex);
			}
		},
		getcurrentItemIndex: function() {
			return this.currentItemIndex;
		},
		getItems: function() {
			return this.items;
		},
		next: function() {
			if (this.getcurrentItemIndex() !== (this.items.size() - 1)) {
				this.select(this.items.at(this.getcurrentItemIndex() + 1));
			} else {
				this.select(this.items.first());
			}
		},
		previous: function() {
			if (this.getcurrentItemIndex() !== 0) {
				this.select(this.items.at(this.getcurrentItemIndex() - 1));
			} else {
				this.select(this.items.last());
			}
		}
	});

	window.resume = new Resume();

	window.toolbarItems = new SelectableItems();
	window.toolbarItems.url = '/assets/toolbar.json';
	window.toolbar = new SelectableModel({
		items: window.toolbarItems
	});

	window.projectItems = new ProjectItems();

	window.projectSelector = new SelectableModel({
		items: window.projectItems
	});

	window.writingItems = new SelectableItems();
	window.writingItems.url = '/assets/writings.json';
	window.writings = new SelectableModel({
		items: window.writingItems
	});

	$(document).ready(function() {
		window.ToolbarItemView = Backbone.View.extend({
			tag: 'div',
			className: 'maja-navigation-toolbar-item',
			events: {
				'click .toolbar-click-item': 'select'
			},
			initialize: function() {
				_.bindAll(this, 'render', 'select');
				this.bind('select', this.render);
				this.model.bind('change', this.render);
				this.template = _.template($('#maja_toolbar_item_template').html());
				this.toolbar = this.options.toolbar;
			},
			render: function() {
				var renderedContent = this.template(this.model.toJSON());
				$(this.el).html(renderedContent);

				if (this.model.selected) {
					$(this.el).addClass('maja-navigation-toolbar-selected');
				} else if ($(this.el).hasClass('maja-navigation-toolbar-selected')) {
					$(this.el).removeClass('maja-navigation-toolbar-selected');
				}
				return this;
			},
			select: function() {
				this.toolbar.trigger('select', this.model);
			}
		});

		window.ToolbarView = Backbone.View.extend({
			initialize: function() {
				_.bindAll(this, 'render');
				this.toolbar = this.options.toolbar;

				this.toolbar.getItems().bind('reset', this.render);
				this.toolbar.getItems().bind('change', this.render);
			},
			render: function() {
				var $itemsRoot, toolbar = this.toolbar,
					collection = this.toolbar.getItems();

				$itemsRoot = $('#toolbar');
				$itemsRoot.empty();
				collection.each(function(toolbarItem) {
					var view = new ToolbarItemView({
						model: toolbarItem,
						toolbar: toolbar
					});
					$itemsRoot.append(view.render().el);
				});
				return this;
			}
		});

		window.ProjectItemView = Backbone.View.extend({
			tag: 'div',
			className: 'maja-gallery-item',
			events: {
				'click .maja_project_gallery_item_title': 'select',
				'click div.gv_gallery': 'select'
			},
			initialize: function() {
				_.bindAll(this, 'render', 'select', 'update');

				this.bind('select', this.update);
				this.model.bind('change', this.update);

				this.template = _.template($('#maja_project_template').html());
				this.imageTemplate = _.template($('#maja_project_image_template').html());
				this.gallery = this.options.gallery;
				this.toolbar = this.options.toolbar;

				this.galleryViewConfig = {
					transition_speed: 2000,
					//INT - duration of panel/frame transition (in milliseconds)
					transition_interval: 4000,
					//INT - delay between panel/frame transitions (in milliseconds)
					easing: 'swing',
					//STRING - easing method to use for animations (jQuery provides 'swing' or 'linear', more available with jQuery UI or Easing plugin)
					show_panels: true,
					//BOOLEAN - flag to show or hide panel portion of gallery
					show_panel_nav: true,
					//BOOLEAN - flag to show or hide panel navigation buttons
					enable_overlays: false,
					//BOOLEAN - flag to show or hide panel overlay
					panel_width: 250,
					//INT - width of gallery panel (in pixels)
					panel_height: 250,
					//INT - height of gallery panel (in pixels)
					panel_animation: 'slide',
					//STRING - animation method for panel transitions (crossfade,fade,slide,none)
					panel_scale: 'crop',
					//STRING - cropping option for panel images (crop = scale image and fit to aspect ratio determined by panel_width and panel_height, fit = scale image and preserve original aspect ratio)
					overlay_position: 'bottom',
					//STRING - position of panel overlay (bottom, top)
					pan_images: true,
					//BOOLEAN - flag to allow user to grab/drag oversized images within gallery
					pan_style: 'drag',
					//STRING - panning method (drag = user clicks and drags image to pan, track = image automatically pans based on mouse position
					pan_smoothness: 15,
					//INT - determines smoothness of tracking pan animation (higher number = smoother)
					start_frame: 1,
					//INT - index of panel/frame to show first when gallery loads
					show_filmstrip: false,
					//BOOLEAN - flag to show or hide filmstrip portion of gallery
					show_filmstrip_nav: false,
					//BOOLEAN - flag indicating whether to display navigation buttons
					enable_slideshow: false,
					//BOOLEAN - flag indicating whether to display slideshow play/pause button
					autoplay: false,
					//BOOLEAN - flag to start slideshow on gallery load
					show_captions: false,
					//BOOLEAN - flag to show or hide frame captions
					filmstrip_size: 3,
					//INT - number of frames to show in filmstrip-only gallery
					filmstrip_style: 'scroll',
					//STRING - type of filmstrip to use (scroll = display one line of frames, scroll filmstrip if necessary, showall = display multiple rows of frames if necessary)
					filmstrip_position: 'bottom',
					//STRING - position of filmstrip within gallery (bottom, top, left, right)
					frame_width: 60,
					//INT - width of filmstrip frames (in pixels)
					frame_height: 30,
					//INT - width of filmstrip frames (in pixels)
					frame_opacity: 0.5,
					//FLOAT - transparency of non-active frames (1.0 = opaque, 0.0 = transparent)
					frame_scale: 'crop',
					//STRING - cropping option for filmstrip images (same as above)
					frame_gap: 5,
					//INT - spacing between frames within filmstrip (in pixels)
					show_infobar: false,
					//BOOLEAN - flag to show or hide infobar
					infobar_opacity: 1 //FLOAT - transparency for info bar
				};

			},
			render: function() {
				var renderedContent = this.template(this.model.toJSON());

				$(this.el).html(renderedContent);

				if (this.model.selected) {
					$(this.el).addClass('maja-gallery-item-selected');
				} else if ($(this.el).hasClass('maja-gallery-item-selected')) {
					$(this.el).removeClass('maja-gallery-item-selected');
				}

				$projectImagesRoot = $(this.el).find('#maja_gallery_minimized_' + this.model.id);
				$projectImagesRoot.empty();
				$projectImagesRoot.append(this.imageTemplate(this.model.toJSON()));

				var gv = $projectImagesRoot.galleryView(this.galleryViewConfig);

				$('.gv_panel > img').on('click', gv.showNext);

				new ProjectDetailView({
					model: this.model,
					toolbar: this.toolbar,
					gallery: this.gallery
				}).render();

				return this;
			},
			update: function() {
				if (this.model.selected) {
					$(this.el).addClass('maja-gallery-item-selected');
				} else if ($(this.el).hasClass('maja-gallery-item-selected')) {
					$(this.el).removeClass('maja-gallery-item-selected');
				}
			},
			select: function() {
				this.gallery.trigger('select', this.model);
			}
		});

		window.ProjectView = Backbone.View.extend({
			initialize: function() {
				_.bindAll(this, 'render', 'toggle', 'show', 'hide');

				this.gallery = this.options.gallery;
				this.gallery.getItems().bind('reset', this.render);
				this.gallery.getItems().bind('add', this.render);

				this.gallery.getItems().bind('select', this.hide);

				this.galleryTemplate = _.template($('#maja_project_gallery_template').html());

				this.selectedIndex = 0;

				this.toolbar = this.options.toolbar;
				this.toolbar.bind('selected', this.render);

				this.toolbar.bind('selected', this.toggle);
			},
			render: function() {
				if (this.toolbar.getcurrentItemIndex() === this.selectedIndex) {
					var $contentRoot = $('#content');
					$contentRoot.empty();
					$contentRoot.append(this.galleryTemplate());

					var $itemsRoot, gallery = this.gallery,
						collection = this.gallery.getItems();
					toolbar = this.toolbar;

					$itemsRoot = $contentRoot.find('#maja_project_gallery');
					$itemsRoot.empty();
					collection.each(function(item) {
						var view = new ProjectItemView({
							model: item,
							gallery: gallery,
							toolbar: toolbar
						});
						$itemsRoot.append(view.render().el);
					});
				}
				return this;
			},
			toggle: function(selectedItemIndex) {
				if (selectedItemIndex === this.selectedIndex) {
					this.show();
				} else {
					this.hide();
				}
			},
			show: function() {
				$('#maja_project_gallery').show();
			},
			hide: function() {
				$('#maja_project_gallery').hide();
			}
		});

		window.ProjectDetailView = Backbone.View.extend({
			initialize: function() {
				_.bindAll(this, 'render', 'show', 'hide', 'next', 'previous');

				this.selectedIndex = 0;

				this.model.bind('select', this.show);
				this.model.bind('unSelect', this.hide);

				this.template = _.template($('#maja_gallery_detail_template').html());
				this.imageTemplate = _.template($('#maja_project_image_template').html());
				this.gallery = this.options.gallery;

				this.toolbar = this.options.toolbar;
				this.toolbar.bind('selected', this.hide);

				this.galleryViewConfig = {
					transition_speed: 2000,
					//INT - duration of panel/frame transition (in milliseconds)
					transition_interval: 4000,
					//INT - delay between panel/frame transitions (in milliseconds)
					easing: 'swing',
					//STRING - easing method to use for animations (jQuery provides 'swing' or 'linear', more available with jQuery UI or Easing plugin)
					show_panels: true,
					//BOOLEAN - flag to show or hide panel portion of gallery
					show_panel_nav: true,
					//BOOLEAN - flag to show or hide panel navigation buttons
					enable_overlays: true,
					//BOOLEAN - flag to show or hide panel overlays
					panel_width: 1024,
					//INT - width of gallery panel (in pixels)
					panel_height: 600,
					//INT - height of gallery panel (in pixels)
					panel_animation: 'fade',
					//STRING - animation method for panel transitions (crossfade,fade,slide,none)
					panel_scale: 'fit',
					//STRING - cropping option for panel images (crop = scale image and fit to aspect ratio determined by panel_width and panel_height, fit = scale image and preserve original aspect ratio)
					overlay_position: 'bottom',
					//STRING - position of panel overlay (bottom, top)
					pan_images: true,
					//BOOLEAN - flag to allow user to grab/drag oversized images within gallery
					pan_style: 'drag',
					//STRING - panning method (drag = user clicks and drags image to pan, track = image automatically pans based on mouse position
					pan_smoothness: 15,
					//INT - determines smoothness of tracking pan animation (higher number = smoother)
					start_frame: 1,
					//INT - index of panel/frame to show first when gallery loads
					show_filmstrip: true,
					//BOOLEAN - flag to show or hide filmstrip portion of gallery
					show_filmstrip_nav: true,
					//BOOLEAN - flag indicating whether to display navigation buttons
					enable_slideshow: false,
					//BOOLEAN - flag indicating whether to display slideshow play/pause button
					autoplay: false,
					//BOOLEAN - flag to start slideshow on gallery load
					show_captions: true,
					//BOOLEAN - flag to show or hide frame captions
					filmstrip_size: 3,
					//INT - number of frames to show in filmstrip-only gallery
					filmstrip_style: 'scroll',
					//STRING - type of filmstrip to use (scroll = display one line of frames, scroll filmstrip if necessary, showall = display multiple rows of frames if necessary)
					filmstrip_position: 'bottom',
					//STRING - position of filmstrip within gallery (bottom, top, left, right)
					frame_width: 164,
					//INT - width of filmstrip frames (in pixels)
					frame_height: 80,
					//INT - width of filmstrip frames (in pixels)
					frame_opacity: 0.7,
					//FLOAT - transparency of non-active frames (1.0 = opaque, 0.0 = transparent)
					frame_scale: 'crop',
					//STRING - cropping option for filmstrip images (same as above)
					frame_gap: 5,
					//INT - spacing between frames within filmstrip (in pixels)
					show_infobar: true,
					//BOOLEAN - flag to show or hide infobar
					infobar_opacity: 1 //FLOAT - transparency for info bar
				};
			},
			render: function() {
				var renderedContent = this.template(this.model.toJSON());
				$contentRoot = $('#maja_project_gallery_detail');
				$contentRoot.append(renderedContent);

				$projectImagesRoot = $contentRoot.find('#maja_gallery_detail_images_' + this.model.id);
				$projectImagesRoot.empty();
				$projectImagesRoot.append(this.imageTemplate(this.model.toJSON()));

				this.gv = $projectImagesRoot.galleryView(this.galleryViewConfig);

				$detailRoot = $contentRoot.find('#maja_gallery_detail_panel_' + this.model.id);
				$detailRoot.find('.maja-gallery-detail-nav.maja-gallery-detail-right-nav').on('click', this.next);
				$detailRoot.find('.maja-gallery-detail-nav.maja-gallery-detail-left-nav').on('click', this.previous);

				$detailRoot.hide();

				return this;
			},
			show: function() {
				$('#maja_gallery_detail_panel_' + this.model.id).show();
			},
			hide: function() {
				$('#maja_gallery_detail_panel_' + this.model.id).hide();
			},
			next: function() {
				this.gallery.next();
			},
			previous: function() {
				this.gallery.previous();
			}
		});

		window.ResumeView = Backbone.View.extend({
			initialize: function() {
				_.bindAll(this, 'render', 'toggle', 'show', 'hide');
				this.selectedIndex = 2;
				this.template = _.template($('#maja_resume_template').html());
				this.toolbar = this.options.toolbar;
				this.toolbar.bind('selected', this.render);

				this.toolbar.bind('selected', this.toggle);

				this.resume = this.options.resume;
				this.resume.bind('reset', this.render);
			},
			render: function() {
				if (this.toolbar.getcurrentItemIndex() === this.selectedIndex) {
					var $contentRoot = $('#content');
					$contentRoot.empty();
					$contentRoot.append(this.template());

					$resumeRoot = $contentRoot.find('#maja_resume');

					collection = this.resume;

					collection.each(function(item) {
						var view = new ResumeSectionView({
							model: item,
							toolbar: toolbar,
							collection: collection
						});
						$resumeRoot.append(view.render().el);
					});

					this.hide();
				}
				return this;
			},
			toggle: function(selectedItemIndex) {
				if (selectedItemIndex === this.selectedIndex) {
					this.show();
				} else {
					this.hide();
				}
			},
			show: function() {
				$('#maja_resume').show();
			},
			hide: function() {
				$('#maja_resume').hide();
			}
		});

		window.ResumeSectionView = Backbone.View.extend({
			className: 'maja-resume-section',
			initialize: function() {
				_.bindAll(this, 'render');

				this.collection = this.options.collection;
				this.template = _.template($('#maja_resume_section_template').html());

			},
			render: function() {
				var renderedContent = this.template(this.model.toJSON());
				$(this.el).html(renderedContent);

				if (this.collection.first() === this.model) {
					$(this.el).addClass('maja-resume-section-first');
				}
				if (this.collection.last() === this.model) {
					$(this.el).addClass('maja-resume-section-last');
				}

				return this;
			}
		});

		window.WritingItemView = Backbone.View.extend({
			initialize: function() {
				_.bindAll(this, 'render', 'expand', 'contract', 'update', 'select');
				this.template = _.template($('#maja_writings_item_template').html());
				this.model.bind('select', this.expand);
				this.model.bind('unSelect', this.contract);

				this.writings = this.options.writings;
				this.collection = this.options.collection;
			},
			render: function() {
				var renderedContent = this.template(this.model.toJSON());
				$(this.el).html(renderedContent);

				$(this.el).find('.maja-writings-sneak-peek').on('click', this.select);

				this.contract();

				return this;
			},
			update: function() {
				if (this.model.selected) {
					this.expand();
				} else {
					this.contract();
				}
			},
			expand: function() {
				$(this.el).find('.maja-writings-paragraph').show();
				$(this.el).find('.maja-writings-sneak-peek').removeClass('hover');
				$(this.el).find('.maja-writings-sneak-peek > span').remove();
			},
			contract: function() {
				$(this.el).find('.maja-writings-paragraph').hide();
				$(this.el).find('.maja-writings-sneak-peek').addClass('hover');
				$(this.el).find('.maja-writings-sneak-peek').append('<span>..</span>');
			},
			select: function() {
				this.writings.trigger('select', this.model);
			}
		});

		window.WritingsView = Backbone.View.extend({
			initialize: function() {
				_.bindAll(this, 'render', 'toggle', 'show', 'hide');
				this.selectedIndex = 1;
				this.template = _.template($('#maja_writings_template').html());

				this.toolbar = this.options.toolbar;
				this.toolbar.bind('selected', this.render);
				this.toolbar.bind('selected', this.toggle);

				this.writings = this.options.writings;
				this.writings.bind('reset', this.render);
			},
			render: function() {
				if (this.toolbar.getcurrentItemIndex() === this.selectedIndex) {

					var $contentRoot = $('#content');
					$contentRoot.empty();

					$contentRoot.append(this.template());

					$writingsRoot = $contentRoot.find('#maja_writings');

					collection = this.writings;

					collection.each(function(item) {
						var view = new WritingItemView({
							model: item,
							writings: writings,
							collection: collection
						});
						$writingsRoot.append(view.render().el);
					});

					this.hide();
				}
				return this;
			},
			toggle: function(selectedItemIndex) {
				if (selectedItemIndex === this.selectedIndex) {
					this.show();
				} else {
					this.hide();
				}
			},
			show: function() {
				$('#maja_writings').show();
			},
			hide: function() {
				$('#maja_writings').hide();
			}
		});

		window.Maja = Backbone.Router.extend({
			routes: {
				'': 'home'
			},
			initialize: function() {
				window.projects = [];

 if ( window.XDomainRequest && !jQuery.support.cors ) {
	jQuery.ajaxTransport(function( s ) {
		if ( s.crossDomain && s.async ) {
			if ( s.timeout ) {
				s.xdrTimeout = s.timeout;
				delete s.timeout;
			}
			var xdr;
			return {
				send: function( _, complete ) {
					function callback( status, statusText, responses, responseHeaders ) {
						xdr.onload = xdr.onerror = xdr.ontimeout = xdr.onprogress = jQuery.noop;
						xdr = undefined;
						jQuery.event.trigger( "ajaxStop" );
						complete( status, statusText, responses, responseHeaders );
					}
					xdr = new XDomainRequest();
					xdr.open( s.type, s.url );
					xdr.onload = function() {
						var status = 200;
						var message = xdr.responseText;
						var r = JSON.parse(xdr.responseText);
						if (r.StatusCode && r.Message) {
							status = r.StatusCode;
							message = r.Message;
						}
						callback( status , message, { text: message }, "Content-Type: " + xdr.contentType );
					};
					xdr.onerror = function() {
						callback( 500, "Unable to Process Data" );
					};
					xdr.onprogress = function() {};
					if ( s.xdrTimeout ) {
						xdr.ontimeout = function() {
							callback( 0, "timeout" );
						};
						xdr.timeout = s.xdrTimeout;
					}
					xdr.send( ( s.hasContent && s.data ) || null );
				},
				abort: function() {
					if ( xdr ) {
						xdr.onerror = jQuery.noop();
						xdr.abort();
					}
				}
			};
		}
	});
}
				window.toolbarItems.fetch({
					success: function(collection, response) {
						collection.at(0).select();
					}
				});

				this.toolbar = new ToolbarView({
					toolbar: window.toolbar
				});

				window.photosets = new Photosets();
				window.photosets.fetch({error: function(model, reponse){
					alert('peep');
				}});

				window.writingItems.fetch();

				window.resume.fetch();

				window.projectView = new ProjectView({
					gallery: window.projectSelector,
					toolbar: window.toolbar
				});

				this.resumeView = new ResumeView({
					toolbar: window.toolbar,
					resume: window.resume
				});

				this.writingsView = new WritingsView({
					toolbar: window.toolbar,
					writings: window.writingItems
				});
				this.footer = new Footer();
				this.footer.fetch({
					success: function(model, response) {
						$footer = $('#footer');
						var template = _.template($('#maja_footer_template').html());
						$footer.append(template(model.toJSON()));
						$footer.find('#footer-right').append(window.twittr.widgetEl);
						$footer.find('.twtr-hd').hide();
					}
				});
			},
			home: function() {
				var $container = $('#toolbar');
				$container.empty();
				$container.append(this.toolbar.render().el);
			}
		});

		$(function() {
			window.App = new Maja();
			Backbone.history.start();
		});
	});
})(jQuery);


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

<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
Uses of Class org.springframework.security.AuthenticationCredentialsNotFoundException (Spring Security 2.0.4 API)
</TITLE>

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

Spring Security Framework

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
org.springframework.security.AuthenticationCredentialsNotFoundException

Packages that use AuthenticationCredentialsNotFoundException

org.springframework.security.context.httpinvoker
Enables use of Spring's HttpInvoker extension points to
present the principal and credentials located
in the ContextHolder via BASIC authentication.

org.springframework.security.event.authorization
Provides support objects for security event interception (ie authorization).

org.springframework.security.ui.switchuser
Provides HTTP-based "switch user" (su) capabilities.

Uses of AuthenticationCredentialsNotFoundException in org.springframework.security.context.httpinvoker

Methods in org.springframework.security.context.httpinvoker that throw AuthenticationCredentialsNotFoundException

protected  void
AuthenticationSimpleHttpInvokerRequestExecutor.prepareConnection(HttpURLConnection con,
                  int contentLength)

          Called every time a HTTP invocation is made.

Uses of AuthenticationCredentialsNotFoundException in org.springframework.security.event.authorization

Methods in org.springframework.security.event.authorization that return AuthenticationCredentialsNotFoundException

 AuthenticationCredentialsNotFoundException
AuthenticationCredentialsNotFoundEvent.getCredentialsNotFoundException()

Constructors in org.springframework.security.event.authorization with parameters of type AuthenticationCredentialsNotFoundException

AuthenticationCredentialsNotFoundEvent(Object secureObject,
                                       ConfigAttributeDefinition configAttribs,
                                       AuthenticationCredentialsNotFoundException credentialsNotFoundException)

          Construct the event.

Uses of AuthenticationCredentialsNotFoundException in org.springframework.security.ui.switchuser

Methods in org.springframework.security.ui.switchuser that throw AuthenticationCredentialsNotFoundException

protected  Authentication
SwitchUserProcessingFilter.attemptExitUser(HttpServletRequest request)

          Attempt to exit from an already switched user.

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

Spring Security Framework

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Copyright © 2004-2008 SpringSource, Inc. All Rights Reserved.

redpajama_set_name: RedPajamaGithub


text:
// Class header file.
#include "XalanAVTPartSimpleAllocator.hpp"

namespace XALAN_CPP_NAMESPACE {

XalanAVTPartSimpleAllocator::XalanAVTPartSimpleAllocator(MemoryManager&  theManager, size_type  theBlockCount) :
    m_allocator(theManager, theBlockCount)
{
}

XalanAVTPartSimpleAllocator::~XalanAVTPartSimpleAllocator()
{
}

XalanAVTPartSimpleAllocator::data_type*
XalanAVTPartSimpleAllocator::create(
            StylesheetConstructionContext&  constructionContext,
            const XalanDOMChar*             val,
            XalanDOMString::size_type       len)
{
    data_type* const    theBlock = m_allocator.allocateBlock();
    assert(theBlock != 0);

    data_type* const    theResult =
        new(theBlock) data_type(constructionContext, val, len);

    m_allocator.commitAllocation(theBlock);

    return theResult;
}

}


text:
package com.example.yarss;

import android.content.Context;
import android.database.Cursor;
import android.support.v4.content.AsyncTaskLoader;

public abstract class SimpleCursorLoader extends AsyncTaskLoader<Cursor> {
	private Cursor mCursor;

	public SimpleCursorLoader(Context context) {
		super(context);
	}

	/* Runs on a worker thread */
	@Override
	public abstract Cursor loadInBackground();

	/* Runs on the UI thread */
	@Override
	public void deliverResult(Cursor cursor) {
		if (isReset()) {
			// An async query came in while the loader is stopped
			if (cursor != null) {
				cursor.close();
			}
			return;
		}
		Cursor oldCursor = mCursor;
		mCursor = cursor;

		if (isStarted()) {
			super.deliverResult(cursor);
		}

		if (oldCursor != null && oldCursor != cursor && !oldCursor.isClosed()) {
			oldCursor.close();
		}
	}

	/**
	 * Starts an asynchronous load of the contacts list data. When the result is
	 * ready the callbacks will be called on the UI thread. If a previous load
	 * has been completed and is still valid the result may be passed to the
	 * callbacks immediately.
	 * <p/>
	 * Must be called from the UI thread
	 */
	@Override
	protected void onStartLoading() {
		if (mCursor != null) {
			deliverResult(mCursor);
		}
		if (takeContentChanged() || mCursor == null) {
			forceLoad();
		}
	}

	/**
	 * Must be called from the UI thread
	 */
	@Override
	protected void onStopLoading() {
		// Attempt to cancel the current load task if possible.
		cancelLoad();
	}

	@Override
	public void onCanceled(Cursor cursor) {
		if (cursor != null && !cursor.isClosed()) {
			cursor.close();
		}
	}

	@Override
	protected void onReset() {
		super.onReset();

		// Ensure the loader is stopped
		onStopLoading();

		if (mCursor != null && !mCursor.isClosed()) {
			mCursor.close();
		}
		mCursor = null;
	}
}


text:
import React from 'react'
import PropTypes from 'prop-types'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import Header from '../components/Header'
import MainSection from '../components/MainSection'
import * as TodoActions from '../actions'

const App = ({todos, actions}) => (
  <div>
    <Header addTodo={actions.addTodo} />
    <MainSection todos={todos} actions={actions} />
  </div>
)

App.propTypes = {
  todos: PropTypes.array.isRequired,
  actions: PropTypes.object.isRequired
}

const mapStateToProps = state => ({
  todos: state.todos
})

const mapDispatchToProps = dispatch => ({
    actions: bindActionCreators(TodoActions, dispatch)
})

export default connect(
  mapStateToProps,
  mapDispatchToProps
)(App)


text:
EMS - REST API
- API version: v1

This section will provide necessary information about the `CoinAPI EMS REST API` protocol.

This API is also available in the Postman application: https://postman.coinapi.io/

Implemented Standards:

  * [HTTP1.0](https://datatracker.ietf.org/doc/html/rfc1945)
  * [HTTP1.1](https://datatracker.ietf.org/doc/html/rfc2616)
  * [HTTP2.0](https://datatracker.ietf.org/doc/html/rfc7540)

### Endpoints

      Deployment method
      Environment
      Url

      Managed Cloud
      Production
      Use Managed Cloud REST API /v1/locations to get specific endpoints to each server site where your deployments span

      Managed Cloud
      Sandbox
      https://ems-gateway-aws-eu-central-1-dev.coinapi.io/

      Self Hosted
      Production
      IP Address of the ems-gateway container/excecutable in the closest server site to the caller location

      Self Hosted
      Sandbox
      IP Address of the ems-gateway container/excecutable in the closest server site to the caller location

### Authentication
If the software is deployed as `Self-Hosted` then API do not require authentication as inside your infrastructure, your company is responsible for the security and access controls.

If the software is deployed in our `Managed Cloud`, there are 2 methods for authenticating with us, you only need to use one:

 1. Custom authorization header named `X-CoinAPI-Key` with the API Key
 2. Query string parameter named `apikey` with the API Key
 3. TLS Client Certificate from the `Managed Cloud REST API` (/v1/certificate/pem endpoint) while establishing a TLS session with us.

#### Custom authorization header
You can authorize by providing additional custom header named `X-CoinAPI-Key` and API key as its value.
Assuming that your API key is `73034021-THIS-IS-SAMPLE-KEY`, then the authorization header you should send to us will look like:

`X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY`
This method is recommended by us and you should use it in production environments.
#### Query string authorization parameter
You can authorize by providing an additional parameter named `apikey` with a value equal to your API key in the query string of your HTTP request.
Assuming that your API key is `73034021-THIS-IS-SAMPLE-KEY` and that you want to request all balances, then your query string should look like this:

`GET /v1/balances?apikey=73034021-THIS-IS-SAMPLE-KEY`
Query string method may be more practical for development activities.

  For more information, please visit [https://www.coinapi.io](https://www.coinapi.io)

*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*

## Requirements

Building the API client library requires:
1. Java 1.7+
2. Maven/Gradle/SBT

## Installation

To install the API client library to your local Maven repository, simply execute:

```shell
mvn clean install
```

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

```shell
mvn clean deploy
```

Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.

### Maven users

Add this dependency to your project's POM:

```xml
<dependency>
  <groupId>org.openapitools</groupId>
  <artifactId>openapi-client</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>
```

### Gradle users

Add this dependency to your project's build file:

```groovy
compile "org.openapitools:openapi-client:1.0.0"
```

### SBT users

```scala
libraryDependencies += "org.openapitools" % "openapi-client" % "1.0.0"
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following Java code:

```scala

import org.openapitools.client.core._
import org.openapitools.client.model._
import org.openapitools.client.api.BalancesApi

import akka.actor.ActorSystem
import scala.concurrent.Future
import scala.util.{Failure, Success}

object BalancesApiExample extends App {

    implicit val system: ActorSystem = ActorSystem()
    import system.dispatcher
    // Create invoker to execute requests
    val apiInvoker = ApiInvoker()
    val apiInstance = BalancesApi("https://ems-gateway-aws-eu-central-1-dev.coinapi.io")
    val exchangeId: String = KRAKEN // String | Filter the balances to the specific exchange.

    val request = apiInstance.v1BalancesGet(exchangeId)
    val response = apiInvoker.execute(request)

    response.onComplete {
        case Success(org.openapitools.client.core.ApiResponse(code, content, headers)) =>
            System.out.println(s"Status code: $code}")
            System.out.println(s"Response headers: ${headers.mkString(", ")}")
            System.out.println(s"Response body: $content")

        case Failure(error @ ApiError(code, message, responseContent, cause, headers)) =>
            System.err.println("Exception when calling BalancesApi#v1BalancesGet")
            System.err.println(s"Status code: $code}")
            System.err.println(s"Reason: $responseContent")
            System.err.println(s"Response headers: ${headers.mkString(", ")}")
            error.printStackTrace();

        case Failure(exception) =>
            System.err.println("Exception when calling BalancesApi#v1BalancesGet")
            exception.printStackTrace();
    }

}

```

## Documentation for API Endpoints

All URIs are relative to *https://ems-gateway-aws-eu-central-1-dev.coinapi.io*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BalancesApi* | [**v1BalancesGet**](docs/BalancesApi.md#v1BalancesGet) | **GET** /v1/balances | Get balances
*OrdersApi* | [**v1OrdersCancelAllPost**](docs/OrdersApi.md#v1OrdersCancelAllPost) | **POST** /v1/orders/cancel/all | Cancel all orders request
*OrdersApi* | [**v1OrdersCancelPost**](docs/OrdersApi.md#v1OrdersCancelPost) | **POST** /v1/orders/cancel | Cancel order request
*OrdersApi* | [**v1OrdersGet**](docs/OrdersApi.md#v1OrdersGet) | **GET** /v1/orders | Get open orders
*OrdersApi* | [**v1OrdersHistoryTimeStartTimeEndGet**](docs/OrdersApi.md#v1OrdersHistoryTimeStartTimeEndGet) | **GET** /v1/orders/history/{time_start}/{time_end} | History of order changes
*OrdersApi* | [**v1OrdersPost**](docs/OrdersApi.md#v1OrdersPost) | **POST** /v1/orders | Send new order
*OrdersApi* | [**v1OrdersStatusClientOrderIdGet**](docs/OrdersApi.md#v1OrdersStatusClientOrderIdGet) | **GET** /v1/orders/status/{client_order_id} | Get order execution report
*PositionsApi* | [**v1PositionsGet**](docs/PositionsApi.md#v1PositionsGet) | **GET** /v1/positions | Get open positions

## Documentation for Models

 - [Balance](docs/Balance.md)
 - [BalanceDataInner](docs/BalanceDataInner.md)
 - [Fills](docs/Fills.md)
 - [MessageError](docs/MessageError.md)
 - [MessageReject](docs/MessageReject.md)
 - [OrdSide](docs/OrdSide.md)
 - [OrdStatus](docs/OrdStatus.md)
 - [OrdType](docs/OrdType.md)
 - [OrderCancelAllRequest](docs/OrderCancelAllRequest.md)
 - [OrderCancelSingleRequest](docs/OrderCancelSingleRequest.md)
 - [OrderExecutionReport](docs/OrderExecutionReport.md)
 - [OrderExecutionReportAllOf](docs/OrderExecutionReportAllOf.md)
 - [OrderHistory](docs/OrderHistory.md)
 - [OrderNewSingleRequest](docs/OrderNewSingleRequest.md)
 - [Position](docs/Position.md)
 - [PositionDataInner](docs/PositionDataInner.md)
 - [RejectReason](docs/RejectReason.md)
 - [TimeInForce](docs/TimeInForce.md)
 - [ValidationError](docs/ValidationError.md)

## Documentation for Authorization

All endpoints do not require authorization.
Authentication schemes defined for the API:

## Author

support@coinapi.io


text:
#pragma once
#include <aws/mediaconvert/MediaConvert_EXPORTS.h>
#include <aws/mediaconvert/model/NielsenActiveWatermarkProcessType.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/mediaconvert/model/NielsenSourceWatermarkStatusType.h>
#include <aws/mediaconvert/model/NielsenUniqueTicPerAudioTrackType.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace MediaConvert
{
namespace Model
{

  /**
   * Ignore these settings unless you are using Nielsen non-linear watermarking.
   * Specify the values that  MediaConvert uses to generate and place Nielsen
   * watermarks in your output audio. In addition to  specifying these values, you
   * also need to set up your cloud TIC server. These settings apply to  every output
   * in your job. The MediaConvert implementation is currently with the following
   * Nielsen versions: Nielsen Watermark SDK Version 5.2.1 Nielsen NLM Watermark
   * Engine Version 1.2.7 Nielsen Watermark Authenticator [SID_TIC] Version
   * [5.0.0]

See Also:
   AWS
   * API Reference

   */
  class AWS_MEDIACONVERT_API NielsenNonLinearWatermarkSettings
  {
  public:
    NielsenNonLinearWatermarkSettings();
    NielsenNonLinearWatermarkSettings(Aws::Utils::Json::JsonView jsonValue);
    NielsenNonLinearWatermarkSettings& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     * Choose the type of Nielsen watermarks that you want in your outputs. When you
     * choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting
     * SID (sourceId). When you choose CBET (CBET), you must provide a value for the
     * setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET
     * (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
     */
    inline const NielsenActiveWatermarkProcessType& GetActiveWatermarkProcess() const{ return m_activeWatermarkProcess; }

    /**
     * Choose the type of Nielsen watermarks that you want in your outputs. When you
     * choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting
     * SID (sourceId). When you choose CBET (CBET), you must provide a value for the
     * setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET
     * (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
     */
    inline bool ActiveWatermarkProcessHasBeenSet() const { return m_activeWatermarkProcessHasBeenSet; }

    /**
     * Choose the type of Nielsen watermarks that you want in your outputs. When you
     * choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting
     * SID (sourceId). When you choose CBET (CBET), you must provide a value for the
     * setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET
     * (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
     */
    inline void SetActiveWatermarkProcess(const NielsenActiveWatermarkProcessType& value) { m_activeWatermarkProcessHasBeenSet = true; m_activeWatermarkProcess = value; }

    /**
     * Choose the type of Nielsen watermarks that you want in your outputs. When you
     * choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting
     * SID (sourceId). When you choose CBET (CBET), you must provide a value for the
     * setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET
     * (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
     */
    inline void SetActiveWatermarkProcess(NielsenActiveWatermarkProcessType&& value) { m_activeWatermarkProcessHasBeenSet = true; m_activeWatermarkProcess = std::move(value); }

    /**
     * Choose the type of Nielsen watermarks that you want in your outputs. When you
     * choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting
     * SID (sourceId). When you choose CBET (CBET), you must provide a value for the
     * setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET
     * (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
     */
    inline NielsenNonLinearWatermarkSettings& WithActiveWatermarkProcess(const NielsenActiveWatermarkProcessType& value) { SetActiveWatermarkProcess(value); return *this;}

    /**
     * Choose the type of Nielsen watermarks that you want in your outputs. When you
     * choose NAES 2 and NW (NAES2_AND_NW), you must provide a value for the setting
     * SID (sourceId). When you choose CBET (CBET), you must provide a value for the
     * setting CSID (cbetSourceId). When you choose NAES 2, NW, and CBET
     * (NAES2_AND_NW_AND_CBET), you must provide values for both of these settings.
     */
    inline NielsenNonLinearWatermarkSettings& WithActiveWatermarkProcess(NielsenActiveWatermarkProcessType&& value) { SetActiveWatermarkProcess(std::move(value)); return *this;}

    /**
     * Optional. Use this setting when you want the service to include an ADI file in
     * the Nielsen  metadata .zip file. To provide an ADI file, store it in Amazon S3
     * and provide a URL to it  here. The URL should be in the following format:
     * S3://bucket/path/ADI-file. For more information about the metadata .zip file,
     * see the setting Metadata destination (metadataDestination).
     */
    inline const Aws::String& GetAdiFilename() const{ return m_adiFilename; }

    /**
     * Optional. Use this setting when you want the service to include an ADI file in
     * the Nielsen  metadata .zip file. To provide an ADI file, store it in Amazon S3
     * and provide a URL to it  here. The URL should be in the following format:
     * S3://bucket/path/ADI-file. For more information about the metadata .zip file,
     * see the setting Metadata destination (metadataDestination).
     */
    inline bool AdiFilenameHasBeenSet() const { return m_adiFilenameHasBeenSet; }

    /**
     * Optional. Use this setting when you want the service to include an ADI file in
     * the Nielsen  metadata .zip file. To provide an ADI file, store it in Amazon S3
     * and provide a URL to it  here. The URL should be in the following format:
     * S3://bucket/path/ADI-file. For more information about the metadata .zip file,
     * see the setting Metadata destination (metadataDestination).
     */
    inline void SetAdiFilename(const Aws::String& value) { m_adiFilenameHasBeenSet = true; m_adiFilename = value; }

    /**
     * Optional. Use this setting when you want the service to include an ADI file in
     * the Nielsen  metadata .zip file. To provide an ADI file, store it in Amazon S3
     * and provide a URL to it  here. The URL should be in the following format:
     * S3://bucket/path/ADI-file. For more information about the metadata .zip file,
     * see the setting Metadata destination (metadataDestination).
     */
    inline void SetAdiFilename(Aws::String&& value) { m_adiFilenameHasBeenSet = true; m_adiFilename = std::move(value); }

    /**
     * Optional. Use this setting when you want the service to include an ADI file in
     * the Nielsen  metadata .zip file. To provide an ADI file, store it in Amazon S3
     * and provide a URL to it  here. The URL should be in the following format:
     * S3://bucket/path/ADI-file. For more information about the metadata .zip file,
     * see the setting Metadata destination (metadataDestination).
     */
    inline void SetAdiFilename(const char* value) { m_adiFilenameHasBeenSet = true; m_adiFilename.assign(value); }

    /**
     * Optional. Use this setting when you want the service to include an ADI file in
     * the Nielsen  metadata .zip file. To provide an ADI file, store it in Amazon S3
     * and provide a URL to it  here. The URL should be in the following format:
     * S3://bucket/path/ADI-file. For more information about the metadata .zip file,
     * see the setting Metadata destination (metadataDestination).
     */
    inline NielsenNonLinearWatermarkSettings& WithAdiFilename(const Aws::String& value) { SetAdiFilename(value); return *this;}

    /**
     * Optional. Use this setting when you want the service to include an ADI file in
     * the Nielsen  metadata .zip file. To provide an ADI file, store it in Amazon S3
     * and provide a URL to it  here. The URL should be in the following format:
     * S3://bucket/path/ADI-file. For more information about the metadata .zip file,
     * see the setting Metadata destination (metadataDestination).
     */
    inline NielsenNonLinearWatermarkSettings& WithAdiFilename(Aws::String&& value) { SetAdiFilename(std::move(value)); return *this;}

    /**
     * Optional. Use this setting when you want the service to include an ADI file in
     * the Nielsen  metadata .zip file. To provide an ADI file, store it in Amazon S3
     * and provide a URL to it  here. The URL should be in the following format:
     * S3://bucket/path/ADI-file. For more information about the metadata .zip file,
     * see the setting Metadata destination (metadataDestination).
     */
    inline NielsenNonLinearWatermarkSettings& WithAdiFilename(const char* value) { SetAdiFilename(value); return *this;}

    /**
     * Use the asset ID that you provide to Nielsen to uniquely identify this asset.
     * Required for all Nielsen non-linear watermarking.
     */
    inline const Aws::String& GetAssetId() const{ return m_assetId; }

    /**
     * Use the asset ID that you provide to Nielsen to uniquely identify this asset.
     * Required for all Nielsen non-linear watermarking.
     */
    inline bool AssetIdHasBeenSet() const { return m_assetIdHasBeenSet; }

    /**
     * Use the asset ID that you provide to Nielsen to uniquely identify this asset.
     * Required for all Nielsen non-linear watermarking.
     */
    inline void SetAssetId(const Aws::String& value) { m_assetIdHasBeenSet = true; m_assetId = value; }

    /**
     * Use the asset ID that you provide to Nielsen to uniquely identify this asset.
     * Required for all Nielsen non-linear watermarking.
     */
    inline void SetAssetId(Aws::String&& value) { m_assetIdHasBeenSet = true; m_assetId = std::move(value); }

    /**
     * Use the asset ID that you provide to Nielsen to uniquely identify this asset.
     * Required for all Nielsen non-linear watermarking.
     */
    inline void SetAssetId(const char* value) { m_assetIdHasBeenSet = true; m_assetId.assign(value); }

    /**
     * Use the asset ID that you provide to Nielsen to uniquely identify this asset.
     * Required for all Nielsen non-linear watermarking.
     */
    inline NielsenNonLinearWatermarkSettings& WithAssetId(const Aws::String& value) { SetAssetId(value); return *this;}

    /**
     * Use the asset ID that you provide to Nielsen to uniquely identify this asset.
     * Required for all Nielsen non-linear watermarking.
     */
    inline NielsenNonLinearWatermarkSettings& WithAssetId(Aws::String&& value) { SetAssetId(std::move(value)); return *this;}

    /**
     * Use the asset ID that you provide to Nielsen to uniquely identify this asset.
     * Required for all Nielsen non-linear watermarking.
     */
    inline NielsenNonLinearWatermarkSettings& WithAssetId(const char* value) { SetAssetId(value); return *this;}

    /**
     * Use the asset name that you provide to Nielsen for this asset. Required for all
     * Nielsen non-linear watermarking.
     */
    inline const Aws::String& GetAssetName() const{ return m_assetName; }

    /**
     * Use the asset name that you provide to Nielsen for this asset. Required for all
     * Nielsen non-linear watermarking.
     */
    inline bool AssetNameHasBeenSet() const { return m_assetNameHasBeenSet; }

    /**
     * Use the asset name that you provide to Nielsen for this asset. Required for all
     * Nielsen non-linear watermarking.
     */
    inline void SetAssetName(const Aws::String& value) { m_assetNameHasBeenSet = true; m_assetName = value; }

    /**
     * Use the asset name that you provide to Nielsen for this asset. Required for all
     * Nielsen non-linear watermarking.
     */
    inline void SetAssetName(Aws::String&& value) { m_assetNameHasBeenSet = true; m_assetName = std::move(value); }

    /**
     * Use the asset name that you provide to Nielsen for this asset. Required for all
     * Nielsen non-linear watermarking.
     */
    inline void SetAssetName(const char* value) { m_assetNameHasBeenSet = true; m_assetName.assign(value); }

    /**
     * Use the asset name that you provide to Nielsen for this asset. Required for all
     * Nielsen non-linear watermarking.
     */
    inline NielsenNonLinearWatermarkSettings& WithAssetName(const Aws::String& value) { SetAssetName(value); return *this;}

    /**
     * Use the asset name that you provide to Nielsen for this asset. Required for all
     * Nielsen non-linear watermarking.
     */
    inline NielsenNonLinearWatermarkSettings& WithAssetName(Aws::String&& value) { SetAssetName(std::move(value)); return *this;}

    /**
     * Use the asset name that you provide to Nielsen for this asset. Required for all
     * Nielsen non-linear watermarking.
     */
    inline NielsenNonLinearWatermarkSettings& WithAssetName(const char* value) { SetAssetName(value); return *this;}

    /**
     * Use the CSID that Nielsen provides to you. This CBET source ID should be unique
     * to your Nielsen account but common to all of your output assets that have CBET
     * watermarking. Required when you choose a value for the setting Watermark types
     * (ActiveWatermarkProcess) that includes CBET.
     */
    inline const Aws::String& GetCbetSourceId() const{ return m_cbetSourceId; }

    /**
     * Use the CSID that Nielsen provides to you. This CBET source ID should be unique
     * to your Nielsen account but common to all of your output assets that have CBET
     * watermarking. Required when you choose a value for the setting Watermark types
     * (ActiveWatermarkProcess) that includes CBET.
     */
    inline bool CbetSourceIdHasBeenSet() const { return m_cbetSourceIdHasBeenSet; }

    /**
     * Use the CSID that Nielsen provides to you. This CBET source ID should be unique
     * to your Nielsen account but common to all of your output assets that have CBET
     * watermarking. Required when you choose a value for the setting Watermark types
     * (ActiveWatermarkProcess) that includes CBET.
     */
    inline void SetCbetSourceId(const Aws::String& value) { m_cbetSourceIdHasBeenSet = true; m_cbetSourceId = value; }

    /**
     * Use the CSID that Nielsen provides to you. This CBET source ID should be unique
     * to your Nielsen account but common to all of your output assets that have CBET
     * watermarking. Required when you choose a value for the setting Watermark types
     * (ActiveWatermarkProcess) that includes CBET.
     */
    inline void SetCbetSourceId(Aws::String&& value) { m_cbetSourceIdHasBeenSet = true; m_cbetSourceId = std::move(value); }

    /**
     * Use the CSID that Nielsen provides to you. This CBET source ID should be unique
     * to your Nielsen account but common to all of your output assets that have CBET
     * watermarking. Required when you choose a value for the setting Watermark types
     * (ActiveWatermarkProcess) that includes CBET.
     */
    inline void SetCbetSourceId(const char* value) { m_cbetSourceIdHasBeenSet = true; m_cbetSourceId.assign(value); }

    /**
     * Use the CSID that Nielsen provides to you. This CBET source ID should be unique
     * to your Nielsen account but common to all of your output assets that have CBET
     * watermarking. Required when you choose a value for the setting Watermark types
     * (ActiveWatermarkProcess) that includes CBET.
     */
    inline NielsenNonLinearWatermarkSettings& WithCbetSourceId(const Aws::String& value) { SetCbetSourceId(value); return *this;}

    /**
     * Use the CSID that Nielsen provides to you. This CBET source ID should be unique
     * to your Nielsen account but common to all of your output assets that have CBET
     * watermarking. Required when you choose a value for the setting Watermark types
     * (ActiveWatermarkProcess) that includes CBET.
     */
    inline NielsenNonLinearWatermarkSettings& WithCbetSourceId(Aws::String&& value) { SetCbetSourceId(std::move(value)); return *this;}

    /**
     * Use the CSID that Nielsen provides to you. This CBET source ID should be unique
     * to your Nielsen account but common to all of your output assets that have CBET
     * watermarking. Required when you choose a value for the setting Watermark types
     * (ActiveWatermarkProcess) that includes CBET.
     */
    inline NielsenNonLinearWatermarkSettings& WithCbetSourceId(const char* value) { SetCbetSourceId(value); return *this;}

    /**
     * Optional. If this asset uses an episode ID with Nielsen, provide it here.
     */
    inline const Aws::String& GetEpisodeId() const{ return m_episodeId; }

    /**
     * Optional. If this asset uses an episode ID with Nielsen, provide it here.
     */
    inline bool EpisodeIdHasBeenSet() const { return m_episodeIdHasBeenSet; }

    /**
     * Optional. If this asset uses an episode ID with Nielsen, provide it here.
     */
    inline void SetEpisodeId(const Aws::String& value) { m_episodeIdHasBeenSet = true; m_episodeId = value; }

    /**
     * Optional. If this asset uses an episode ID with Nielsen, provide it here.
     */
    inline void SetEpisodeId(Aws::String&& value) { m_episodeIdHasBeenSet = true; m_episodeId = std::move(value); }

    /**
     * Optional. If this asset uses an episode ID with Nielsen, provide it here.
     */
    inline void SetEpisodeId(const char* value) { m_episodeIdHasBeenSet = true; m_episodeId.assign(value); }

    /**
     * Optional. If this asset uses an episode ID with Nielsen, provide it here.
     */
    inline NielsenNonLinearWatermarkSettings& WithEpisodeId(const Aws::String& value) { SetEpisodeId(value); return *this;}

    /**
     * Optional. If this asset uses an episode ID with Nielsen, provide it here.
     */
    inline NielsenNonLinearWatermarkSettings& WithEpisodeId(Aws::String&& value) { SetEpisodeId(std::move(value)); return *this;}

    /**
     * Optional. If this asset uses an episode ID with Nielsen, provide it here.
     */
    inline NielsenNonLinearWatermarkSettings& WithEpisodeId(const char* value) { SetEpisodeId(value); return *this;}

    /**
     * Specify the Amazon S3 location where you want MediaConvert to save your Nielsen
     * non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region
     * as the one where you do your MediaConvert transcoding. If you want to include an
     * ADI file in this .zip file, use the setting ADI file (adiFilename) to specify
     * it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata
     * destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You
     * are responsible for delivering the metadata .zip files to Nielsen.
     */
    inline const Aws::String& GetMetadataDestination() const{ return m_metadataDestination; }

    /**
     * Specify the Amazon S3 location where you want MediaConvert to save your Nielsen
     * non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region
     * as the one where you do your MediaConvert transcoding. If you want to include an
     * ADI file in this .zip file, use the setting ADI file (adiFilename) to specify
     * it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata
     * destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You
     * are responsible for delivering the metadata .zip files to Nielsen.
     */
    inline bool MetadataDestinationHasBeenSet() const { return m_metadataDestinationHasBeenSet; }

    /**
     * Specify the Amazon S3 location where you want MediaConvert to save your Nielsen
     * non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region
     * as the one where you do your MediaConvert transcoding. If you want to include an
     * ADI file in this .zip file, use the setting ADI file (adiFilename) to specify
     * it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata
     * destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You
     * are responsible for delivering the metadata .zip files to Nielsen.
     */
    inline void SetMetadataDestination(const Aws::String& value) { m_metadataDestinationHasBeenSet = true; m_metadataDestination = value; }

    /**
     * Specify the Amazon S3 location where you want MediaConvert to save your Nielsen
     * non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region
     * as the one where you do your MediaConvert transcoding. If you want to include an
     * ADI file in this .zip file, use the setting ADI file (adiFilename) to specify
     * it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata
     * destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You
     * are responsible for delivering the metadata .zip files to Nielsen.
     */
    inline void SetMetadataDestination(Aws::String&& value) { m_metadataDestinationHasBeenSet = true; m_metadataDestination = std::move(value); }

    /**
     * Specify the Amazon S3 location where you want MediaConvert to save your Nielsen
     * non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region
     * as the one where you do your MediaConvert transcoding. If you want to include an
     * ADI file in this .zip file, use the setting ADI file (adiFilename) to specify
     * it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata
     * destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You
     * are responsible for delivering the metadata .zip files to Nielsen.
     */
    inline void SetMetadataDestination(const char* value) { m_metadataDestinationHasBeenSet = true; m_metadataDestination.assign(value); }

    /**
     * Specify the Amazon S3 location where you want MediaConvert to save your Nielsen
     * non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region
     * as the one where you do your MediaConvert transcoding. If you want to include an
     * ADI file in this .zip file, use the setting ADI file (adiFilename) to specify
     * it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata
     * destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You
     * are responsible for delivering the metadata .zip files to Nielsen.
     */
    inline NielsenNonLinearWatermarkSettings& WithMetadataDestination(const Aws::String& value) { SetMetadataDestination(value); return *this;}

    /**
     * Specify the Amazon S3 location where you want MediaConvert to save your Nielsen
     * non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region
     * as the one where you do your MediaConvert transcoding. If you want to include an
     * ADI file in this .zip file, use the setting ADI file (adiFilename) to specify
     * it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata
     * destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You
     * are responsible for delivering the metadata .zip files to Nielsen.
     */
    inline NielsenNonLinearWatermarkSettings& WithMetadataDestination(Aws::String&& value) { SetMetadataDestination(std::move(value)); return *this;}

    /**
     * Specify the Amazon S3 location where you want MediaConvert to save your Nielsen
     * non-linear metadata .zip file. This Amazon S3 bucket must be in the same Region
     * as the one where you do your MediaConvert transcoding. If you want to include an
     * ADI file in this .zip file, use the setting ADI file (adiFilename) to specify
     * it. MediaConvert delivers the Nielsen metadata .zip files only to your metadata
     * destination Amazon S3 bucket. It doesn't deliver the .zip files to Nielsen. You
     * are responsible for delivering the metadata .zip files to Nielsen.
     */
    inline NielsenNonLinearWatermarkSettings& WithMetadataDestination(const char* value) { SetMetadataDestination(value); return *this;}

    /**
     * Use the SID that Nielsen provides to you. This source ID should be unique to
     * your Nielsen account but common to all of your output assets. Required for all
     * Nielsen non-linear watermarking. This ID should be unique to your Nielsen
     * account but common to all of your output assets. Required for all Nielsen
     * non-linear watermarking.
     */
    inline int GetSourceId() const{ return m_sourceId; }

    /**
     * Use the SID that Nielsen provides to you. This source ID should be unique to
     * your Nielsen account but common to all of your output assets. Required for all
     * Nielsen non-linear watermarking. This ID should be unique to your Nielsen
     * account but common to all of your output assets. Required for all Nielsen
     * non-linear watermarking.
     */
    inline bool SourceIdHasBeenSet() const { return m_sourceIdHasBeenSet; }

    /**
     * Use the SID that Nielsen provides to you. This source ID should be unique to
     * your Nielsen account but common to all of your output assets. Required for all
     * Nielsen non-linear watermarking. This ID should be unique to your Nielsen
     * account but common to all of your output assets. Required for all Nielsen
     * non-linear watermarking.
     */
    inline void SetSourceId(int value) { m_sourceIdHasBeenSet = true; m_sourceId = value; }

    /**
     * Use the SID that Nielsen provides to you. This source ID should be unique to
     * your Nielsen account but common to all of your output assets. Required for all
     * Nielsen non-linear watermarking. This ID should be unique to your Nielsen
     * account but common to all of your output assets. Required for all Nielsen
     * non-linear watermarking.
     */
    inline NielsenNonLinearWatermarkSettings& WithSourceId(int value) { SetSourceId(value); return *this;}

    /**
     * Required. Specify whether your source content already contains Nielsen
     * non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the
     * service fails the job. Nielsen requires that you add non-linear watermarking to
     * only clean content that doesn't already  have non-linear Nielsen watermarks.
     */
    inline const NielsenSourceWatermarkStatusType& GetSourceWatermarkStatus() const{ return m_sourceWatermarkStatus; }

    /**
     * Required. Specify whether your source content already contains Nielsen
     * non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the
     * service fails the job. Nielsen requires that you add non-linear watermarking to
     * only clean content that doesn't already  have non-linear Nielsen watermarks.
     */
    inline bool SourceWatermarkStatusHasBeenSet() const { return m_sourceWatermarkStatusHasBeenSet; }

    /**
     * Required. Specify whether your source content already contains Nielsen
     * non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the
     * service fails the job. Nielsen requires that you add non-linear watermarking to
     * only clean content that doesn't already  have non-linear Nielsen watermarks.
     */
    inline void SetSourceWatermarkStatus(const NielsenSourceWatermarkStatusType& value) { m_sourceWatermarkStatusHasBeenSet = true; m_sourceWatermarkStatus = value; }

    /**
     * Required. Specify whether your source content already contains Nielsen
     * non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the
     * service fails the job. Nielsen requires that you add non-linear watermarking to
     * only clean content that doesn't already  have non-linear Nielsen watermarks.
     */
    inline void SetSourceWatermarkStatus(NielsenSourceWatermarkStatusType&& value) { m_sourceWatermarkStatusHasBeenSet = true; m_sourceWatermarkStatus = std::move(value); }

    /**
     * Required. Specify whether your source content already contains Nielsen
     * non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the
     * service fails the job. Nielsen requires that you add non-linear watermarking to
     * only clean content that doesn't already  have non-linear Nielsen watermarks.
     */
    inline NielsenNonLinearWatermarkSettings& WithSourceWatermarkStatus(const NielsenSourceWatermarkStatusType& value) { SetSourceWatermarkStatus(value); return *this;}

    /**
     * Required. Specify whether your source content already contains Nielsen
     * non-linear watermarks. When you set this value to Watermarked (WATERMARKED), the
     * service fails the job. Nielsen requires that you add non-linear watermarking to
     * only clean content that doesn't already  have non-linear Nielsen watermarks.
     */
    inline NielsenNonLinearWatermarkSettings& WithSourceWatermarkStatus(NielsenSourceWatermarkStatusType&& value) { SetSourceWatermarkStatus(std::move(value)); return *this;}

    /**
     * Specify the endpoint for the TIC server that you have deployed and configured in
     * the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert
     * can't connect directly to a TIC server. Instead, you must use API Gateway to
     * provide a RESTful interface between MediaConvert and a TIC server that you
     * deploy in your AWS account. For more information on deploying a TIC server in
     * your AWS account and the required API Gateway, contact Nielsen support.
     */
    inline const Aws::String& GetTicServerUrl() const{ return m_ticServerUrl; }

    /**
     * Specify the endpoint for the TIC server that you have deployed and configured in
     * the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert
     * can't connect directly to a TIC server. Instead, you must use API Gateway to
     * provide a RESTful interface between MediaConvert and a TIC server that you
     * deploy in your AWS account. For more information on deploying a TIC server in
     * your AWS account and the required API Gateway, contact Nielsen support.
     */
    inline bool TicServerUrlHasBeenSet() const { return m_ticServerUrlHasBeenSet; }

    /**
     * Specify the endpoint for the TIC server that you have deployed and configured in
     * the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert
     * can't connect directly to a TIC server. Instead, you must use API Gateway to
     * provide a RESTful interface between MediaConvert and a TIC server that you
     * deploy in your AWS account. For more information on deploying a TIC server in
     * your AWS account and the required API Gateway, contact Nielsen support.
     */
    inline void SetTicServerUrl(const Aws::String& value) { m_ticServerUrlHasBeenSet = true; m_ticServerUrl = value; }

    /**
     * Specify the endpoint for the TIC server that you have deployed and configured in
     * the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert
     * can't connect directly to a TIC server. Instead, you must use API Gateway to
     * provide a RESTful interface between MediaConvert and a TIC server that you
     * deploy in your AWS account. For more information on deploying a TIC server in
     * your AWS account and the required API Gateway, contact Nielsen support.
     */
    inline void SetTicServerUrl(Aws::String&& value) { m_ticServerUrlHasBeenSet = true; m_ticServerUrl = std::move(value); }

    /**
     * Specify the endpoint for the TIC server that you have deployed and configured in
     * the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert
     * can't connect directly to a TIC server. Instead, you must use API Gateway to
     * provide a RESTful interface between MediaConvert and a TIC server that you
     * deploy in your AWS account. For more information on deploying a TIC server in
     * your AWS account and the required API Gateway, contact Nielsen support.
     */
    inline void SetTicServerUrl(const char* value) { m_ticServerUrlHasBeenSet = true; m_ticServerUrl.assign(value); }

    /**
     * Specify the endpoint for the TIC server that you have deployed and configured in
     * the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert
     * can't connect directly to a TIC server. Instead, you must use API Gateway to
     * provide a RESTful interface between MediaConvert and a TIC server that you
     * deploy in your AWS account. For more information on deploying a TIC server in
     * your AWS account and the required API Gateway, contact Nielsen support.
     */
    inline NielsenNonLinearWatermarkSettings& WithTicServerUrl(const Aws::String& value) { SetTicServerUrl(value); return *this;}

    /**
     * Specify the endpoint for the TIC server that you have deployed and configured in
     * the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert
     * can't connect directly to a TIC server. Instead, you must use API Gateway to
     * provide a RESTful interface between MediaConvert and a TIC server that you
     * deploy in your AWS account. For more information on deploying a TIC server in
     * your AWS account and the required API Gateway, contact Nielsen support.
     */
    inline NielsenNonLinearWatermarkSettings& WithTicServerUrl(Aws::String&& value) { SetTicServerUrl(std::move(value)); return *this;}

    /**
     * Specify the endpoint for the TIC server that you have deployed and configured in
     * the AWS Cloud. Required for all Nielsen non-linear watermarking. MediaConvert
     * can't connect directly to a TIC server. Instead, you must use API Gateway to
     * provide a RESTful interface between MediaConvert and a TIC server that you
     * deploy in your AWS account. For more information on deploying a TIC server in
     * your AWS account and the required API Gateway, contact Nielsen support.
     */
    inline NielsenNonLinearWatermarkSettings& WithTicServerUrl(const char* value) { SetTicServerUrl(value); return *this;}

    /**
     * To create assets that have the same TIC values in each audio track, keep the
     * default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have
     * unique TIC values for each audio track, choose Use unique TICs
     * (RESERVE_UNIQUE_TICS_PER_TRACK).
     */
    inline const NielsenUniqueTicPerAudioTrackType& GetUniqueTicPerAudioTrack() const{ return m_uniqueTicPerAudioTrack; }

    /**
     * To create assets that have the same TIC values in each audio track, keep the
     * default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have
     * unique TIC values for each audio track, choose Use unique TICs
     * (RESERVE_UNIQUE_TICS_PER_TRACK).
     */
    inline bool UniqueTicPerAudioTrackHasBeenSet() const { return m_uniqueTicPerAudioTrackHasBeenSet; }

    /**
     * To create assets that have the same TIC values in each audio track, keep the
     * default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have
     * unique TIC values for each audio track, choose Use unique TICs
     * (RESERVE_UNIQUE_TICS_PER_TRACK).
     */
    inline void SetUniqueTicPerAudioTrack(const NielsenUniqueTicPerAudioTrackType& value) { m_uniqueTicPerAudioTrackHasBeenSet = true; m_uniqueTicPerAudioTrack = value; }

    /**
     * To create assets that have the same TIC values in each audio track, keep the
     * default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have
     * unique TIC values for each audio track, choose Use unique TICs
     * (RESERVE_UNIQUE_TICS_PER_TRACK).
     */
    inline void SetUniqueTicPerAudioTrack(NielsenUniqueTicPerAudioTrackType&& value) { m_uniqueTicPerAudioTrackHasBeenSet = true; m_uniqueTicPerAudioTrack = std::move(value); }

    /**
     * To create assets that have the same TIC values in each audio track, keep the
     * default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have
     * unique TIC values for each audio track, choose Use unique TICs
     * (RESERVE_UNIQUE_TICS_PER_TRACK).
     */
    inline NielsenNonLinearWatermarkSettings& WithUniqueTicPerAudioTrack(const NielsenUniqueTicPerAudioTrackType& value) { SetUniqueTicPerAudioTrack(value); return *this;}

    /**
     * To create assets that have the same TIC values in each audio track, keep the
     * default value Share TICs (SAME_TICS_PER_TRACK). To create assets that have
     * unique TIC values for each audio track, choose Use unique TICs
     * (RESERVE_UNIQUE_TICS_PER_TRACK).
     */
    inline NielsenNonLinearWatermarkSettings& WithUniqueTicPerAudioTrack(NielsenUniqueTicPerAudioTrackType&& value) { SetUniqueTicPerAudioTrack(std::move(value)); return *this;}

  private:

    NielsenActiveWatermarkProcessType m_activeWatermarkProcess;
    bool m_activeWatermarkProcessHasBeenSet;

    Aws::String m_adiFilename;
    bool m_adiFilenameHasBeenSet;

    Aws::String m_assetId;
    bool m_assetIdHasBeenSet;

    Aws::String m_assetName;
    bool m_assetNameHasBeenSet;

    Aws::String m_cbetSourceId;
    bool m_cbetSourceIdHasBeenSet;

    Aws::String m_episodeId;
    bool m_episodeIdHasBeenSet;

    Aws::String m_metadataDestination;
    bool m_metadataDestinationHasBeenSet;

    int m_sourceId;
    bool m_sourceIdHasBeenSet;

    NielsenSourceWatermarkStatusType m_sourceWatermarkStatus;
    bool m_sourceWatermarkStatusHasBeenSet;

    Aws::String m_ticServerUrl;
    bool m_ticServerUrlHasBeenSet;

    NielsenUniqueTicPerAudioTrackType m_uniqueTicPerAudioTrack;
    bool m_uniqueTicPerAudioTrackHasBeenSet;
  };

} // namespace Model
} // namespace MediaConvert
} // namespace Aws


text:
define(function()
{
    "use strict";
    var CopyOperator =
    {
        copy: function(genome)
        {
            InputValidator.validateNotNull("genome", genome);

            return genome.copy();
        }
    };

    function Copier(copyFunction)
    {
        InputValidator.validateNotNull("copyFunction", copyFunction);

        this.execute = function(genome)
        {
            return copyFunction(genome);
        };
    }

    return (
    {
        copy: CopyOperator.copy,
        Copier: Copier,
    });
});


text:
================

Thrift JAVA 框架,服务端自动描述注册服务,客户端Client代理。

# Maven dependency
```
<dependency>
  <groupId>com.cottsoft.thrift.framework</groupId>
  <artifactId>thrift-framework</artifactId>
  <version>0.0.1</version>
</dependency>
```

# Download
https://oss.sonatype.org/content/groups/public/com/cottsoft/thrift/framework/thrift-framework/0.0.1/thrift-framework-0.0.1.jar

# Demo
## Server
```
@Service("sysUserServiceImpl")
@ThriftService(service = "com.cottsoft.thrift.framework.rpc.user.SysUserService")
public class SysUserServiceImpl implements Iface {

	@Override
	public int addSysUser(SysUser sysUser) throws ThriftServiceException,
			TException {
		// TODO Auto-generated method stub
		return 0;
	}
}
```
### Server Spring xml
```
	<!-- 服务工厂 -->
	<bean id="serverFactory"
		class="com.cottsoft.thrift.framework.server.ThriftMultiBinaryServerFactory">
		<property name="baseServiceImplPackage" value="com.cottsoft.thrift.framework.server.service" />
		<property name="port" value="${port.default}" />
		<property name="timeout" value="${timeout.default}" />
	</bean>

	<!-- 使用服务工厂启动服务 -->
	<bean factory-bean="serverFactory" factory-method="start" />
```

## Client
```
public class ClientTest {
	public static String rpcPackage = "com.cottsoft.thrift.framework.server";
	public static String serviceModuel = "user";
	public static String serverIp = "127.0.0.1";
	public static int serverPort = 19090;
	public static int timeout = 2000;

	public static void main(String[] args) {
		ClientTest test = new ClientTest();
		test.execute();
	}

	public void execute(){
		BaseClientFactory clientFactory = null;
		try {
			clientFactory = getFactory("SysUserService");
			SysUserService.Client client = (SysUserService.Client) clientFactory.getClient();

			//client.addSysUser(sysUser);
			//client.deleteSysUser(sysUser);
			List<SysUser> userList = client.getSysUserList();
			System.out.println(userList.size());
		} catch (Exception e) {
			e.printStackTrace();
		}finally{
			if(clientFactory!=null){
				try {
					clientFactory.destroy();
				} catch (ThriftException e) {
					e.printStackTrace();
				}
			}
		}
	}

	public BaseClientFactory getFactory(String serviceName){
		String service = new StringBuffer().append(rpcPackage).append(".").append(serviceModuel).append(".").append(serviceName).toString();
		BaseClientFactory clientFactory = new ThriftBinaryClientFactory(serverIp, serverPort,timeout, service);
		return clientFactory;
	}

}
```


text:
package securbank.dao;

import org.springframework.stereotype.Repository;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.UUID;

import javax.persistence.EntityManager;
import javax.persistence.NoResultException;

import securbank.models.Account;
import securbank.models.Transaction;

/**
 * @author Mitikaa Sama
 *
 * Sep 26, 2016
 */

@Repository("transactionDao")
public class TransactionDaoImpl extends BaseDaoImpl<Transaction, UUID> implements TransactionDao{
	@Autowired
	EntityManager entityManager;

	public TransactionDaoImpl() {
		super(Transaction.class);
	}

	/**
     * Returns list of all transactions in the table
     *
     * @return transactions
     */
	@SuppressWarnings("unchecked")
	@Override
	public List<Transaction> findAll() {
		return (List<Transaction>) this.entityManager.createQuery("SELECT transaction from Transaction transaction")
				.getResultList();
	}

	/**
     * Returns list of transactions in the table filtered by account number
     *
     * @return transactions
     */
	@SuppressWarnings("unchecked")
	@Override
	public List<Transaction> findByAccount(String accountNumber) {
		try {
			return (List<Transaction>) this.entityManager.createQuery("SELECT transaction from Transaction transaction"
					+ " where transaction.accountNumber = :accountNumber")
					.setParameter("accountNumber", accountNumber)
					.getSingleResult();
		}
		catch(NoResultException e) {
			// returns null if no transaction is found
			return null;
		}
	}

	/**
     * Returns list of transactions in the table filtered by account number and type
     *
     * @return transactions
     */
	@SuppressWarnings("unchecked")
	@Override
	public List<Transaction> findByAccountAndType(Long accountNumber, String type) {
		try {
			return (List<Transaction>) this.entityManager.createQuery("SELECT transaction from Transaction transaction"
					+ " where (transaction.accountNumber = :accountNumber AND transaction.type = type)")
					.setParameter("accountNumber", accountNumber)
					.setParameter("type", type)
					.getSingleResult();
		}
		catch(NoResultException e) {
			// returns null if no transaction is found
			return null;
		}
	}

	/**
     * Returns list of transactions in the table filtered by critical status of the transaction
     *
     * @return transactions
     */
	@SuppressWarnings("unchecked")
	@Override
	public List<Transaction> findByCriticalStatus(Boolean criticalStatus) {
		try {
			return (List<Transaction>) this.entityManager.createQuery("SELECT transaction from Transaction transaction"
					+ " where transaction.criticalStatus = :criticalStatus")
					.setParameter("criticalStatus", criticalStatus)
					.getSingleResult();
		}
		catch(NoResultException e) {
			// returns null if no transaction is found
			return null;
		}
	}

	/**
	 Returns list of transactions in the table filtered by the approval status of the transaction
     *
     * @return transactions
	 */
	@Override
	public List<Transaction> findByApprovalStatus(String approvalStatus) {
		try {
			return this.entityManager.createQuery("SELECT transaction from Transaction transaction"
					+ " where transaction.approvalStatus = :approvalStatus", Transaction.class)
					.setParameter("approvalStatus", approvalStatus)
					.getResultList();
		}
		catch(NoResultException e) {
			// returns null if no transaction is found
			return null;
		}
	}

	/**
     * Returns list of transactions in the table filtered by account number and type
     *
     * @return transactions
     */
	@Override
	public List<Transaction> findPendingByAccountAndType(Account account, String type) {
		try {
			return this.entityManager.createQuery("SELECT transaction from Transaction transaction "
					+ "where transaction.account = :account AND transaction.type = :type AND transaction.approvalStatus = :approvalStatus", Transaction.class)
					.setParameter("account", account)
					.setParameter("type", type)
					.setParameter("approvalStatus", "Pending")
					.getResultList();
		}
		catch(NoResultException e) {
			// returns null if no transaction is found
			return null;
		}
	}

	/**
     * Returns list of transactions in the table filtered by critical status of the transaction
     *
     * @return transactions
     */
	@Override
	public List<Transaction> findPendingByCriticalStatus(Boolean criticalStatus) {
		try {
			return  this.entityManager.createQuery("SELECT transaction from Transaction transaction"
					+ " where transaction.criticalStatus = :criticalStatus", Transaction.class)
					.setParameter("criticalStatus", criticalStatus)
					.setParameter("approvalStatus", "Pending")
					.getResultList();
		}
		catch(NoResultException e) {
			// returns null if no transaction is found
			return null;
		}
	}

	/**
     * Returns list of transactions in the table filtered by account number
     *
     * @return transactions
     */
	@SuppressWarnings("unchecked")
	@Override
	public List<Transaction> findPendingByAccount(Long accountNumber) {
		try {
			return (List<Transaction>) this.entityManager.createQuery("SELECT transaction from Transaction transaction"
					+ " where transaction.accountNumber = :accountNumber AND transaction.type = type AND approvalStatus = :approvalStatus")
					.setParameter("accountNumber", accountNumber)
					.setParameter("approvalStatus", "Pending")
					.getSingleResult();
		}
		catch(NoResultException e) {
			// returns null if no transaction is found
			return null;
		}
	}

	@Override
	public Transaction findPendingTransactionByAccount(Long accountNumber) {
		try {
			System.out.println("Inside findPendingTransactionByAccount");
			return  this.entityManager.createQuery("SELECT transaction from Transaction transaction"
					+ " where transaction.account.accountNumber = :accountNumber AND transaction.approvalStatus = :approvalStatus", Transaction.class)
					.setParameter("accountNumber", accountNumber)
					.setParameter("approvalStatus", "Pending")
					.getSingleResult();
		}
		catch(NoResultException e) {
			// returns null if no transaction is found
			return null;
		}
	}
}


text:
package controllers

import (
	"encoding/hex"
	"fmt"
	"html/template"
	"reflect"
	"strconv"
	"strings"
	"time"

	pk "automezzi/utilities/pbkdf2"
	"automezzi/models"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"
	"github.com/astaxie/beego/validation"
)

func (c *MainController) setCompare(query string) (orm.QuerySeter, bool) {
	o := orm.NewOrm()
	qs := o.QueryTable("auth_user")
	if c.Ctx.Input.Method() == "POST" {
		f := compareform{}
		if err := c.ParseForm(&f); err != nil {
			fmt.Println("cannot parse form")
			return qs, false
		}
		valid := validation.Validation{}
		if b, _ := valid.Valid(&f); !b {
			c.Data["Errors"] = valid.ErrorsMap
			return qs, false
		}
		if len(f.Compareop) >= 5 && f.Compareop[:5] == "__not" {
			qs = qs.Exclude(f.Comparefield+f.Compareop[5:], f.Compareval)
		} else {
			qs = qs.Filter(f.Comparefield+f.Compareop, f.Compareval)
		}
		c.Data["query"] = f.Comparefield + f.Compareop + "," + f.Compareval
	} else {
		str := strings.Split(query, ",")
		i := strings.Index(str[0], "__")
		if len(str[0][i:]) >= 5 && str[0][i:i+5] == "__not" {
			qs = qs.Exclude(str[0][:i]+str[0][i+5:], str[1])
		} else {
			qs = qs.Filter(str[0], str[1])
		}
		c.Data["query"] = query
	}
	return qs, true
}

//Manage help administrator to manage all accounts
//TODO ordinare i nomi maiuscolo e minuscolo assieme
func (c *MainController) Manage() {
	// Only administrator can Manage accounts
	c.activeContent("manage/manage")

	//******** c page requires login
	sess := c.GetSession("automezzi")
	if sess == nil {
		c.Redirect("/home", 302)
		return
	}
	flash := beego.NewFlash()
	m := sess.(map[string]interface{})
	fmt.Println(m["admin"])
	fmt.Println(reflect.ValueOf(m["admin"]).Type())
	if m["admin"] != 3 {
		flash.Notice("Non hai i diritti per accedere a questa pagina")
		flash.Store(&c.Controller)
		c.Redirect("/notice", 302)
	}

	fmt.Printf("hai i diritti")

	//in caso di panic reindirizza alla home
	defer func(c *MainController) {
		if r := recover(); r != nil {
			fmt.Println("Recovered in Index", r)
			c.Redirect("/home", 302)
		}
	}(c)
	//NON VA SENZA PARAMETRI
	//******** Read users from database
	if c.Ctx.Input.Param(":parms") == "" {
		o := orm.NewOrm()
		o.Using("default")
		var users []models.AuthUser

		o.QueryTable("auth_user")
		//num, err := o.Raw("SELECT id, first, last, email, idkey FROM auth_user",).QueryRows(&users)
		if err != nil {
			flash.Notice("Errore, contattare l'amministratore del sito")
			flash.Store(&c.Controller)
			c.Redirect("/notice", 302)
		}
        /*QUANDO NON CI SONO PARAMETRI??*/
		//fmt.Println("user nums: ", num)
		for i := range users {
			fmt.Println(users[i])
		}
		rows := "
ID	NOME	COGNOME	EMAIL	MODIFICA
"
		for i := range users {
            /*
			rows += fmt.Sprintf("
%d	"+
				"%s	%s	%s
", users[i].ID, users[i].First, users[i].Last, users[i].Email, appcfgdomainname, users[i].IDkey)
	        */
            rows += fmt.Sprintf("
%d	"+
				"%s	%s	%s
", users[i].ID, users[i].First, users[i].Last, users[i].Email, appcfgdomainname, users[i].IDkey)

    }
		c.Data["Rows"] = template.HTML(rows)
	}
	const pagesize = 10
	parms := c.Ctx.Input.Param(":parms")
	c.Data["parms"] = parms
	str := strings.Split(parms, "!")
	fmt.Println("parms is", str)
	order := str[0]
	off, _ := strconv.Atoi(str[1])
	offset := int64(off)
	if offset < 0 {
		offset = 0
	}
	query := str[2]

	var users []*models.AuthUser
	rows := ""

	qs, ok := c.setCompare(query)
	if !ok {
		fmt.Println("cannot set QuerySeter")
		o := orm.NewOrm()
		qs := o.QueryTable("auth_user")
		qs = qs.Filter("id__gte", 0)
		c.Data["query"] = "id__gte,0"
	}

	count, _ := qs.Count()
	c.Data["count"] = count
	if offset >= count {
		offset = 0
	}
	num, err := qs.Limit(pagesize, offset).OrderBy(order).All(&users)
	if err != nil {
		fmt.Println("Query table failed:", err)
	}
    /*TABELLA IN BASE AI PARAMETRI*/
	for i := range users {
		rows += fmt.Sprintf("
%d	"+
				"%s	%s	%s
", users[i].ID, users[i].First, users[i].Last, users[i].Email, appcfgdomainname, users[i].IDkey)
	}
	c.Data["Rows"] = template.HTML(rows)

	c.Data["order"] = order
	c.Data["offset"] = offset
	c.Data["end"] = max(0, (count/pagesize)*pagesize)

	if num+offset < count {
		c.Data["next"] = num + offset
	}
	if offset-pagesize >= 0 {
		c.Data["prev"] = offset - pagesize
		c.Data["showprev"] = true
	} else if offset > 0 && offset < pagesize {
		c.Data["prev"] = 0
		c.Data["showprev"] = true
	}

	if count > pagesize {
		c.Data["ShowNav"] = true
	}
	c.Data["progress"] = float64(offset*100) / float64(max(count, 1))
}

//UsersManage is for edit accounts by administrator
//TODO quando ritorna al manage lo fa nella pagina 1 e non in quella in cui si trovava l'utente
func (c *MainController) UsersManage() {
	c.activeContent("manage/user")

	//******** c page requires login
	sess := c.GetSession("automezzi")
	if sess == nil {
		c.Redirect("/user/login/home", 302)
		return
	}

	m := sess.(map[string]interface{})
	flash := beego.NewFlash()
	if m["admin"] != 3 {
		c.Redirect("/home", 302)
		flash.Error("Non disponi dei privilegi necessari")
		flash.Store(&c.Controller)
		return
	}

	var x pk.PasswordHash

	x.Hash = make([]byte, 32)
	x.Salt = make([]byte, 16)

	o := orm.NewOrm()
	o.Using("default")
	var IDkey string
	IDkey = c.Ctx.Input.Param(":parms")
	fmt.Println("key: ", IDkey)
	user := models.AuthUser{IDkey: c.Ctx.Input.Param(":parms")}
	err := o.Read(&user, "IDKey")
	if err != nil {
		flash.Error("Internal error")
		flash.Store(&c.Controller)
		return
	}
	// scan in the password hash/salt
	if x.Hash, err = hex.DecodeString(user.Password[:64]); err != nil {
		fmt.Println("ERROR:", err)
	}
	if x.Salt, err = hex.DecodeString(user.Password[64:]); err != nil {
		fmt.Println("ERROR:", err)
	}

	userAPP := models.AuthApp{ID: user.ID}
	err = o.Read(&userAPP, "ID")
	if err != nil {
		flash.Error("Internal error")
		flash.Store(&c.Controller)
		return
	}

	// c deferred function ensures that the correct fields from the database are displayed
	defer func(c *MainController, user *models.AuthUser, userAPP *models.AuthApp) {
		//check the user lvl
		var userlvllist string
		switch user.Group {
		case 0:
			userlvllist += fmt.Sprintf("<option value=\"0\" selected=\"selected\">Utente</option>" +
				"<option value=\"1\">Utente Speciale</option>" +
				"<option value=\"2\">Agente</option>" +
				"<option value=\"3\">Amministratore</option>")
		case 1:
			userlvllist += fmt.Sprintf("<option value=\"0\">Utente</option>" +
				"<option value=\"1\" selected=\"selected\">Utente Speciale</option>" +
				"<option value=\"2\">Agente</option>" +
				"<option value=\"3\">Amministratore</option>")
		case 2:
			userlvllist += fmt.Sprintf("<option value=\"0\">Utente</option>" +
				"<option value=\"1\">Utente Speciale</option>" +
				"<option value=\"2\" selected=\"selected\">Agente</option>" +
				"<option value=\"3\">Amministratore</option>")
		case 3:
			userlvllist += fmt.Sprintf("<option value=\"0\">Utente</option>" +
				"<option value=\"1\">Utente Speciale</option>" +
				"<option value=\"2\">Agente</option>" +
				"<option value=\"3\" selected=\"selected\">Amministratore</option>")
		default:
			panic("unrecognized escape character")
		}

		fmt.Println(user.BlockControll)
		var checkbloccato string
		if user.BlockControll >= 3 {
			checkbloccato += fmt.Sprintf("<input type=\"checkbox\" name=\"blocco\" value=\"bloccato\" checked=\"checked\"> BLOCCATO
	")
			//<input type="checkbox" name="apps" value="bloccato"> BLOCCATO

		} else {
			checkbloccato += fmt.Sprintf("<input type=\"checkbox\" name=\"blocco\" value=\"bloccato\"> BLOCCATO
	")

		}

		//check the app authorization
		var checkautomezzi, checkservizi string
		if userAPP.Automezzi {
			checkautomezzi += fmt.Sprintf("<input type=\"checkbox\" name=\"apps\" value=\"automezzi\" checked=\"checked\"> Automezzi
")
		} else {
			checkautomezzi += fmt.Sprintf("<input type=\"checkbox\" name=\"apps\" value=\"automezzi\"> Automezzi
")
		}
		if userAPP.Servizi {
			checkservizi += fmt.Sprintf("<input type=\"checkbox\" name=\"apps\" value=\"servizi\" checked=\"checked\"> Servizi
")
		} else {
			checkservizi += fmt.Sprintf("<input type=\"checkbox\" name=\"apps\" value=\"servizi\"> Servizi
")
		}

		c.Data["UFirst"] = user.First
		c.Data["ULast"] = user.Last
		c.Data["UEmail"] = user.Email
		c.Data["Userlvllist"] = template.HTML(userlvllist)
		c.Data["Checkbloccato"] = template.HTML(checkbloccato)
		c.Data["Checkautomezzi"] = template.HTML(checkautomezzi)
		c.Data["Checkservizi"] = template.HTML(checkservizi)
	}(c, &user, &userAPP)

	if c.Ctx.Input.Method() == "POST" {
		first := c.GetString("first")
		last := c.GetString("last")
		email := c.GetString("email")
		password := c.GetString("password")
		password2 := c.GetString("password2")
		userlvl := c.GetString("userlvl")
		apps := c.GetStrings("apps")
		blocco := c.GetStrings("blocco")

		valid := validation.Validation{}
		valid.Required(first, "first")
		valid.Email(email, "email")
		if valid.HasErrors() {
			errormap := []string{}
			for _, err := range valid.Errors {
				errormap = append(errormap, "Validation failed on "+err.Key+": "+err.Message+"\n")
			}
			c.Data["Errors"] = errormap
			return
		}

		if password != "" {
			valid.MinSize(password, 6, "password")
			valid.Required(password2, "password2")
			if valid.HasErrors() {
				errormap := []string{}
				for _, err := range valid.Errors {
					errormap = append(errormap, "Validation failed on "+err.Key+": "+err.Message+"\n")
				}
				c.Data["Errors"] = errormap
				return
			}

			if password != password2 {
				flash.Error("Le password non corrispondono")
				flash.Store(&c.Controller)
				return
			}
			h := pk.HashPassword(password)

			// Convert password hash to string
			user.Password = hex.EncodeToString(h.Hash) + hex.EncodeToString(h.Salt)
		}

		/******** Compare submitted password with database
		if !pk.MatchPassword(current, &x) {
			flash.Error("Password attuale errata")
			flash.Store(&c.Controller)
			return
		}*/

		//******** Save user info to database
		user.First = first
		user.Last = last
		user.Email = email
		user.LastEditDate = time.Now()
		user.Group = ConvertInt(userlvl)

		if stringInSlice("bloccato", blocco) {
			user.BlockControll = 3
		} else {
			user.BlockControll = 0
		}
		if stringInSlice("automezzi", apps) {
			userAPP.Automezzi = true
		} else {
			userAPP.Automezzi = false
		}
		if stringInSlice("servizi", apps) {
			userAPP.Servizi = true
		} else {
			userAPP.Servizi = false
		}

		_, err := o.Update(&user)
		if err != nil {
			flash.Error("Errore interno")
			flash.Store(&c.Controller)
			return
		}

		_, err = o.Update(&userAPP)
		if err != nil {
			flash.Error("Errore interno")
			flash.Store(&c.Controller)
			return
		}

		flash.Notice("Profilo aggiornato")
		flash.Store(&c.Controller)

	}

}

//stringInSlice funcion check if string is in slice
func stringInSlice(a string, list []string) bool {
	for _, b := range list {
		if b == a {
			return true
		}
	}
	return false
}

//ConvertInt function convert string in int
func ConvertInt(s string) int {
	//convert string in int
	i, err := strconv.Atoi(s)
	if err != nil {
		panic(err)
	}
	return i
}