text:
package tubame.wsearch.models;

import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;

import tubame.common.util.CmnStringUtil;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.WorkbenchException;
import tubame.wsearch.Activator;
import tubame.wsearch.biz.comparer.AbstractComparer;
import tubame.wsearch.util.resource.ResourceUtil;

/**
 * It is the Row information to be displayed in the search results view.

 */
public class WSearchEditorMigrationRow implements MigrationEditorRow {

    /**
     * The type that defines the hierarchy level.

     */
    public enum LEVEL {
        FIRST(0), SECOND(1), THIRD(2), FOURTH(3), FIFTH(4), SIXTH(5);

        /**
         * Constructor.

         * Nothing in particular.

         *
         * @param level
         *            Hierarchical level
         */
        LEVEL(int level) {
            this.level = level;
        }

        /**
         * Hierarchical level
         */
        private int level;

        /**
         * Get the hierarchy level.

         *
         * @return Hierarchical level
         */
        public int getLevel() {
            return level;
        }
    }

    /**
     * The lowest level
     */
    public final static LEVEL LOWEST_LEVEL = LEVEL.FIFTH;

    /**
     * (Represents the hierarchy) level
     */
    private int level;

    /**
     * Result
     */
    private String status;

    /**
     * Category
     */
    private String category;

    /**
     * Package
     */
    private String packageName;

    /**
     * Porting the original library
     */
    private String srcLibrary;

    /**
     * Porting library
     */
    private String destLibrary;

    /**
     * Class
     */
    private String clazzName;

    /**
     * Hits
     */
    private String hitNum;

    /**
     * Line number
     */
    private String rowNumber;

    /**
     * Migrated files
     */
    private String files;

    /**
     * Migrated files
     */
    private String targetFullPath;

    public String getTargetFullPath() {
		return targetFullPath;
	}

	public void setTargetFullPath(String targetFullPath) {
		this.targetFullPath = targetFullPath;
	}

	/**
     * Result detail
     */
    private String detail;

    /**
     * Remarks
     */
    private String note;

    /**
     * Subelement
     */
    private List<WSearchEditorMigrationRow> childList = new ArrayList<WSearchEditorMigrationRow>();

    /**
     * Parent hierarchy
     */
    private WSearchEditorMigrationRow parent;

    /**
     * Error icon
     */
    private static Image errorIcon;

    /**
     * Warning icon
     */
    private static Image warnIcon;

    static {
        try {
            URL pluginURL = Activator.getDefault().getBundle()
                    .getEntry(CmnStringUtil.SLASH);
            errorIcon = ImageDescriptor.createFromURL(
                    new URL(pluginURL, ResourceUtil.ERROR_ICON)).createImage();
            warnIcon = ImageDescriptor.createFromURL(
                    new URL(pluginURL, ResourceUtil.WARN_ICON)).createImage();
        } catch (MalformedURLException e) {
            Activator.log(e);
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int getLevel() {
        return level;
    }

    /**
     * Set up a hierarchy level.

     *
     * @param level
     *            Hierarchical level
     */
    public void setLevel(int level) {
        this.level = level;
    }

    /**
     * Get child hierarchy level.

     *
     * @return Child hierarchy level
     */
    public List<WSearchEditorMigrationRow> getChildList() {
        return childList;
    }

    /**
     * Set the child hierarchy level.

     *
     * @param childList
     *            Child hierarchy level
     */
    public void setChildList(List<WSearchEditorMigrationRow> childList) {
        this.childList = childList;
    }

    /**
     * Add it to the child hierarchy level.

     *
     * @param item
     *            Additional data
     */
    public void addChild(WSearchEditorMigrationRow item) {
        childList.add(item);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public WSearchEditorMigrationRow getParent() {
        return parent;
    }

    /**
     * Set the parent hierarchy.

     *
     * @param parent
     *            Parent hierarchy
     */
    public void setParent(WSearchEditorMigrationRow parent) {
        this.parent = parent;
    }

    /**
     * Get the status.

     *
     * @return Status
     */
    public String getStatus() {
        return status;
    }

    /**
     * Set the status.

     *
     * @param status
     *            Status
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * Get the category.

     *
     * @return Category
     */
    public String getCategory() {
        return category;
    }

    /**
     * Get the details.

     *
     * @return Detail
     */
    public String getDetail() {
        return detail;
    }

    /**
     * Set the details.

     *
     * @param detail
     *            Detail
     */
    public void setDetail(String detail) {
        this.detail = detail;
    }

    /**
     * Get remarks.

     *
     * @return Remarks
     */
    public String getNote() {
        return note;
    }

    /**
     * Set the remarks.

     *
     * @param note
     *            Remarks
     */
    public void setNote(String note) {
        this.note = note;
    }

    /**
     * Set the category.

     *
     * @param category
     *            Category
     */
    public void setCategory(String category) {
        this.category = category;
    }

    /**
     * Get the package.

     *
     * @return Package name
     */
    public String getPackage() {
        return packageName;
    }

    /**
     * Set the package.

     *
     * @param packageName
     *            Package name
     */
    public void setPackage(String packageName) {
        this.packageName = packageName;
    }

    /**
     * Get the transplant original library.

     *
     * @return Porting the original library name
     */
    public String getSrcLibrary() {
        return srcLibrary;
    }

    /**
     * Set the transplant original library.

     *
     * @param library
     *            Porting the original library name
     */
    public void setSrcLibrary(String library) {
        this.srcLibrary = library;
    }

    /**
     * Get the porting library.

     *
     * @return Porting library name
     */
    public String getDestLibrary() {
        return destLibrary;
    }

    /**
     * Set the porting library.

     *
     * @param library
     *            Porting library name
     */
    public void setDestLibrary(String library) {
        this.destLibrary = library;
    }

    /**
     * Get clazzName.

     *
     * @return clazzName
     */
    public String getClazz() {
        return clazzName;
    }

    /**
     * Set the clazzName.

     *
     * @param clazzName
     *            clazzName
     */
    public void setClazz(String clazzName) {
        this.clazzName = clazzName;
    }

    /**
     * Get hitNum.

     *
     * @return hitNum
     */
    public String getHitNum() {
        return hitNum;
    }

    /**
     * Set the hitNum.

     *
     * @param hitNum
     *            hitNum
     */
    public void setHitNum(String hitNum) {
        this.hitNum = hitNum;
    }

    /**
     * Get rowNumber.

     *
     * @return rowNumber
     */
    public String getRowNumber() {
        return rowNumber;
    }

    /**
     * Set the rowNumber.

     *
     * @param rowNumber
     *            rowNumber
     */
    public void setRowNumber(String rowNumber) {
        this.rowNumber = rowNumber;
    }

    /**
     * Get the files.

     *
     * @return files
     */
    public String getFiles() {
        return files;
    }

    /**
     * Set the files.

     *
     * @param files
     *            files
     */
    public void setFiles(String files) {
        this.files = files;
    }

    /**
     * Get the text to be displayed by specifying the section number of the
     * column.

     *
     * @param columnIndex
     *            No. of column
     * @return Text to be displayed
     */
    public String getColumnText(int columnIndex) {
        return getColumnText(columnIndex, true);
    }

    /**
     * Get the text to be displayed by specifying the element level and the
     * numbers in column.

     *
     * @param columnIndex
     *            No. of column
     * @param affectedByLevel
     *            Element level
     * @return Text to be displayed
     */
    public String getColumnText(int columnIndex, boolean affectedByLevel) {
        String text = CmnStringUtil.EMPTY;
        switch (WSearchEditorEnum.get(columnIndex)) {
        case INDEX_STATUS:
            if (!affectedByLevel || (LEVEL.FIRST.getLevel() == getLevel())) {
                text = getStatus();
            }
            break;
        case INDEX_CATEGORY:
            if (!affectedByLevel || (LEVEL.SECOND.getLevel() == getLevel())) {
                text = getCategory();
            }
            break;
        case INDEX_PACKAGE:
            if (!affectedByLevel || (LEVEL.THIRD.getLevel() == getLevel())) {
                text = getPackage();
                if (CmnStringUtil.isEmpty(text)) {
                    text = CmnStringUtil.HYPHEN;
                }
            }
            break;
        case INDEX_SRC_LIBRARY:
            if (!affectedByLevel || (LEVEL.FOURTH.getLevel() == getLevel())) {
                text = getSrcLibrary();
                if (text.contains(",")) {
                    List<String> libraries = Arrays.asList(text.split(","));
                    Collections.sort(libraries, new LibraryComparetor());
                    StringBuilder string = new StringBuilder();
                    for (String value : libraries) {
                        string.append(value + ",");
                    }
                    text = string.toString();
                    text = text.substring(0, (text.length() - 1));
                }
            }
            break;
        case INDEX_DEST_LIBRARY:
            if (!affectedByLevel || (LEVEL.FOURTH.getLevel() == getLevel())) {
                text = getDestLibrary();
                if (text.contains(",")) {
                    List<String> libraries = Arrays.asList(text.split(","));
                    Collections.sort(libraries, new LibraryComparetor());
                    StringBuilder string = new StringBuilder();
                    for (String value : libraries) {
                        string.append(value + ",");
                    }
                    text = string.toString();
                    text = text.substring(0, (text.length() - 1));
                }
            }
            break;
        case INDEX_CLAZZ:
            if (!affectedByLevel || (LEVEL.FOURTH.getLevel() == getLevel())) {
                text = getClazz();
            }
            break;
        case INDEX_HIT_NUM:
            if (LEVEL.FIRST.getLevel() == getLevel()) {
                int count = 0;
                for (WSearchEditorMigrationRow row : getChildList()) {
                    count += Integer.valueOf(row
                            .getColumnText(WSearchEditorEnum.INDEX_HIT_NUM
                                    .getIndex()));
                }
                text = String.valueOf(count);
            }
            if (LEVEL.SECOND.getLevel() == getLevel()) {
                int count = 0;
                for (WSearchEditorMigrationRow row : getChildList()) {
                    String temp = row
                            .getColumnText(WSearchEditorEnum.INDEX_HIT_NUM
                                    .getIndex());
                    if (!CmnStringUtil.isEmpty(temp)) {
                        count += Integer.valueOf(temp);
                    }
                }
                text = String.valueOf(count);
            }
            if (LEVEL.THIRD.getLevel() == getLevel()) {
                int count = 0;
                for (WSearchEditorMigrationRow row : getChildList()) {
                    String temp = row
                            .getColumnText(WSearchEditorEnum.INDEX_HIT_NUM
                                    .getIndex());
                    if (!CmnStringUtil.isEmpty(temp)) {
                        count += Integer.valueOf(temp);
                    }
                }
                text = String.valueOf(count);
            }
            if (LEVEL.FOURTH.getLevel() == getLevel()) {
                int count = getChildList().size();
                text = String.valueOf(count);
            }
            break;
        case INDEX_FILES:
            if (!affectedByLevel || (LEVEL.FIFTH.getLevel() == getLevel())) {
                text = getFiles();
            }
            break;
        case INDEX_LINE:
            if (!affectedByLevel || (LEVEL.FIFTH.getLevel() == getLevel())) {
                text = getRowNumber();
                if (CmnStringUtil.isEmpty(text)) {
                    text = CmnStringUtil.HYPHEN;
                }
            }
            break;
        case INDEX_DETAIL:
            if (!affectedByLevel || (LEVEL.FIFTH.getLevel() == getLevel())) {
                text = getDetail();
            }
            break;
        case INDEX_NOTE:
            if (!affectedByLevel || (LEVEL.FIFTH.getLevel() == getLevel())) {
                text = getNote();
                if (text.contains(",")) {
                    List<String> libraries = Arrays.asList(text.split(","));
                    Collections.sort(libraries, new LibraryComparetor());
                    StringBuilder string = new StringBuilder();
                    for (String value : libraries) {
                        string.append(value + ",");
                    }
                    text = string.toString();
                    text = text.substring(0, (text.length() - 1));
                }
            }
            break;
        }
        return text;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Image getColumnImage(int columnIndex) {
        switch (WSearchEditorEnum.get(columnIndex)) {
        case INDEX_STATUS:
            if (LEVEL.FIRST.getLevel() == getLevel()) {
                if (AbstractComparer.STATUS.ERROR.getValue()
                        .equals(getStatus())) {
                    return errorIcon;
                } else if (AbstractComparer.STATUS.WARN.getValue().equals(
                        getStatus())) {
                    return warnIcon;
                }
            }
            break;
        case INDEX_DETAIL:
            if (LEVEL.FIFTH.getLevel() == getLevel()) {
                if (AbstractComparer.STATUS.ERROR.getValue()
                        .equals(getStatus())) {
                    return errorIcon;
                } else if (AbstractComparer.STATUS.WARN.getValue().equals(
                        getStatus())) {
                    return warnIcon;
                }
            }
            break;
        default:
            break;
        }
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Font getFont() {
        // no operation
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Color getBackground(int columnIndex) {
        // no operation
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean hasChildren() {
        if (getChildList() != null && getChildList().size() > 0) {
            return true;
        }
        return false;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<WSearchEditorMigrationRow> getChildren() {
        return getChildList();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("\"");
        sb.append(getStatus());
        sb.append("\"");
        sb.append(CmnStringUtil.CSV_DELIMITER);
        sb.append("\"");
        sb.append(getCategory());
        sb.append("\"");
        sb.append(CmnStringUtil.CSV_DELIMITER);
        sb.append("\"");
        sb.append(getPackage());
        sb.append("\"");
        sb.append(CmnStringUtil.CSV_DELIMITER);
        sb.append("\"");
        sb.append(getSrcLibrary());
        sb.append("\"");
        sb.append(CmnStringUtil.CSV_DELIMITER);
        sb.append("\"");
        sb.append(getDestLibrary());
        sb.append("\"");
        sb.append(CmnStringUtil.CSV_DELIMITER);
        sb.append("\"");
        sb.append(getClazz());
        sb.append("\"");
        sb.append(CmnStringUtil.CSV_DELIMITER);
//        sb.append("\"");
//        sb.append(getHitNum());
//        sb.append("\"");
//        sb.append(CmnStringUtil.CSV_DELIMITER);
        sb.append("\"");
        sb.append(getFiles());
        sb.append("\"");
        sb.append(CmnStringUtil.CSV_DELIMITER);
        sb.append("\"");
        sb.append(getRowNumber());
        sb.append("\"");
        sb.append(CmnStringUtil.CSV_DELIMITER);
        sb.append("\"");
        sb.append(getDetail());
        sb.append("\"");
        sb.append(CmnStringUtil.CSV_DELIMITER);
        sb.append("\"");
        sb.append(getNote());
        sb.append("\"");
        return sb.toString();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public WSearchEditorMigrationRow getMoreParent() {
        if (getLevel() == LEVEL.FIRST.getLevel()) {
            return this;
        }
        if (getLevel() == LEVEL.SECOND.getLevel()) {
            return getParent();
        }
        if (getLevel() == LEVEL.THIRD.getLevel()) {
            return getParent().getParent();
        }
        if (getLevel() == LEVEL.FOURTH.getLevel()) {
            return getParent().getParent().getParent();
        }
        return getParent().getParent().getParent().getParent();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void updateWriteData() {
        // no operation
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Color getForeground(int columnIndex) {
        // no operation
        return null;
    }

    /**
     * Library comparison class.

     * Class to be compared to be the order of in the library configuration

     */
    private static class LibraryComparetor implements Comparator<String>,
            Serializable {
        /**
         * Serialization key
         */
        private static final long serialVersionUID = -7251919997296472324L;

        /**
         * {@inheritDoc}
         */
        @Override
        public int compare(String o1, String o2) {
            int order1 = Integer.MAX_VALUE;
            int order2 = Integer.MAX_VALUE;
            try {
                Map<String, LibraryRepository> map = Activator
                        .getLibraryRepositories();
                if (map.containsKey(o1)) {
                    order1 = map.get(o1).getOrder();
                }
                if (map.containsKey(o2)) {
                    order2 = map.get(o2).getOrder();
                }
            } catch (WorkbenchException e) {
                Activator.log(e);
            }
            return order1 - order2;
        }
    }
}


text:
/* js-config.h.  Generated automatically by configure.  */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 * vim: set ts=8 sw=4 et tw=78:
 *
 * ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is Mozilla Communicator client code, released
 * March 31, 1998.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either of the GNU General Public License Version 2 or later (the "GPL"),
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

#ifndef js_config_h___
#define js_config_h___

/* Definitions set at build time that affect SpiderMonkey's public API.
   This header file is generated by the SpiderMonkey configure script,
   and installed along with jsapi.h.  */

/* Define to 1 if SpiderMonkey should support multi-threaded clients.  */
#define JS_THREADSAFE 1

/* Define to 1 if SpiderMonkey should include ctypes support.  */
#define JS_HAS_CTYPES 1

/* Define to 1 if SpiderMonkey should support the ability to perform
   entirely too much GC.  */
/* #undef JS_GC_ZEAL */

/* Define to 1 if the standard <stdint.h> header is present and
   useable.  See jstypes.h and jsstdint.h.  */
#define JS_HAVE_STDINT_H 1

/* Define to 1 if the <sys/types.h> defines int8_t, etc. */
/* #undef JS_SYS_TYPES_H_DEFINES_EXACT_SIZE_TYPES */

/* Define to 1 if the N-byte __intN types are defined by the
   compiler.  */
/* #undef JS_HAVE___INTN */

/* Define to 1 if #including <stddef.h> provides definitions for
   intptr_t and uintptr_t.  */
/* #undef JS_STDDEF_H_HAS_INTPTR_T */

/* Define to 1 if #including <crtdefs.h> provides definitions for
   intptr_t and uintptr_t.  */
/* #undef JS_CRTDEFS_H_HAS_INTPTR_T */

/* The configure script defines these if it doesn't #define
   JS_HAVE_STDINT_H.  */
/* #undef JS_INT8_TYPE */
/* #undef JS_INT16_TYPE */
/* #undef JS_INT32_TYPE */
/* #undef JS_INT64_TYPE */
/* #undef JS_INTPTR_TYPE */
#define JS_BYTES_PER_WORD 8

/* Some mozilla code uses JS-friend APIs that depend on JS_TRACER and
   JS_METHODJIT being correct. */
#define JS_TRACER 1
#define JS_METHODJIT 1

#endif /* js_config_h___ */

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace CL\Slack\Tests\Payload;

use CL\Slack\Payload\ChannelsListPayload;
use CL\Slack\Payload\PayloadInterface;

/**
 * @author Cas Leentfaar <info@casleentfaar.com>
 */
class ChannelsListPayloadTest extends AbstractPayloadTest
{
    /**
     * {@inheritdoc}
     */
    protected function createPayload()
    {
        $payload = new ChannelsListPayload();
        $payload->setExcludeArchived(true);

        return $payload;
    }

    /**
     * {@inheritdoc}
     *
     * @param ChannelsListPayload $payload
     */
    protected function getExpectedPayloadData(PayloadInterface $payload)
    {
        return [
            'exclude_archived' => $payload->isExcludeArchived(),
        ];
    }
}


text:
namespace SkypeAdvertisementsSwitch
{
    using System;
    using System.Windows.Input;

    /// <summary>
    /// A command whose sole purpose is to relay its functionality to other objects by invoking delegates.
    /// <para />
    /// The default return value for the CanExecute method is <c>true</c>.
    /// </summary>
    internal sealed class RelayCommand : ICommand
    {
        /// <summary>
        /// The action which will be executed when the <see cref="ICommand.Execute(object)"/> method is called.
        /// </summary>
        private readonly Action<object> execute;

        /// <summary>
        /// The action which will be executed when the <see cref="ICommand.CanExecute(object)"/> method is called.
        /// </summary>
        private readonly Predicate<object> canExecute;

        /// <summary>
        /// Initializes a new instance of the <see cref="RelayCommand"/> class.
        /// </summary>
        /// <param name="execute">The action which will be executed when the <see cref="ICommand.Execute(object)"/> method is called.</param>
        /// <param name="canExecute">The action which will be executed when the <see cref="ICommand.CanExecute(object)"/> method is called.</param>
        /// <exception cref="System.ArgumentNullException">execute</exception>
        public RelayCommand(Action<object> execute, Predicate<object> canExecute = null)
        {
            if (execute == null)
            {
                throw new ArgumentNullException("execute");
            }
            this.execute = execute;
            this.canExecute = canExecute;
        }

        /// <summary>
        /// Occurs when changes occur that affect whether or not the command should execute.
        /// </summary>
        public event EventHandler CanExecuteChanged;

        /// <summary>
        /// Defines the method that determines whether the command can execute in its current state.
        /// </summary>
        /// <param name="parameter">Data used by the command. If the command does not require data to be passed, this object can be set to null.</param>
        /// <returns><c>true</c> if this command can be executed; otherwise, <c>false</c>.</returns>
        public bool CanExecute(object parameter)
        {
            return canExecute == null ? true : canExecute(parameter);
        }

        /// <summary>
        /// Raises the can execute changed.
        /// </summary>
        public void RaiseCanExecuteChanged()
        {
            if (CanExecuteChanged != null) CanExecuteChanged(this, EventArgs.Empty);
        }

        /// <summary>
        /// Defines the method to be called when the command is invoked.
        /// </summary>
        /// <param name="parameter">Data used by the command. If the command does not require data to be passed, this object can be set to null.</param>
        public void Execute(object parameter)
        {
            execute(parameter);
        }
    }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
in Niwata, Takashima, Tornai-Lehoczki, Deak & Nakase, Int. J. Syst. Evol. Microbiol. 52(5): 1890 (2002)

#### Original name
Udeniomyces pannonicus Niwata, Tornai-Leh., T. Deák & Nakase, 2002

### Remarks
null


text:
#ifndef TEK_SCREEN_H
#define TEK_SCREEN_H

class SDL_Window;
class SDL_Renderer;
class SDL_Texture;
class SDL_Rect;
//
class Tek_Screen
{
    public:
        Tek_Screen();

        /*bool create Screen
        * @param int width
        * @param int height
        * @param const char* title
        */
        bool createScreen(int width, int height, const char* title);
        /* void updateTitle
        *  @param const char* title
        */
        //---------------------------------------
        /* void clearScreen
        */
        void clearScreen();

        /* void flipScreenBuffer
        */
        void flipScreenBuffer();
        /* void drawTexture
        *  @param SDL_Texture* texture
        *  @param SDL_Rect* srcRect
        *  @param SDL_Rect* dstRect
        */
        void drawTexture(SDL_Texture* texture, SDL_Rect* srcRect, SDL_Rect* dstRect);
        //---------------------------------------
        /* SDL_Texture* loadTexture
        *  @param const char* filepath
        */
        SDL_Texture* loadTexture(const char* filepath);
        //----------------------------------------
        void updateTitle(const char* title);
        /* void updateSize
        *  @param int width
        *  @param int height
        */
        void updateSize(int width, int height);
        //----------------------------------------
        void destroy();
        //getters
        SDL_Window* getSDLWindow(){return _window;}
        SDL_Renderer* getSDLRenderer(){return _renderer;}
    private:
        SDL_Window* _window;
        SDL_Renderer* _renderer;
};

#endif // TEK_SCREEN_H


text:
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        # Adding model 'Comment'
        db.create_table('tags_comment', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
            ('tag', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['tags.Tag'])),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
            ('comment', self.gf('django.db.models.fields.CharField')(default='', max_length=500)),
        ))
        db.send_create_signal('tags', ['Comment'])

        # Adding field 'Vote.comment'
        db.add_column('tags_vote', 'comment',
                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['tags.Comment'], null=True, blank=True),
                      keep_default=False)

        # Changing field 'Vote.tag'
        # did not work in production.
        # db.alter_column('tags_vote', 'tag_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['tags.Tag'], null=True))

    def backwards(self, orm):
        # Deleting model 'Comment'
        db.delete_table('tags_comment')

        # Deleting field 'Vote.comment'
        db.delete_column('tags_vote', 'comment_id')

        # Changing field 'Vote.tag'
        # did not work in production
        # db.alter_column('tags_vote', 'tag_id', self.gf('django.db.models.fields.related.ForeignKey')(default=1, to=orm['tags.Tag']))

    models = {
        'api.domain': {
            'Meta': {'object_name': 'Domain'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
            'url': ('django.db.models.fields.URLField', [], {'unique': 'True', 'max_length': '200'})
        },
        'api.page': {
            'Meta': {'object_name': 'Page'},
            'description': ('django.db.models.fields.TextField', [], {'default': "''"}),
            'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Domain']"}),
            'favIconUrl': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'favicon_url': ('django.db.models.fields.TextField', [], {'default': "''"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'img_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '2000'}),
            'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2000'}),
            'url': ('django.db.models.fields.URLField', [], {'max_length': '300'})
        },
        'auth.group': {
            'Meta': {'object_name': 'Group'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
        },
        'auth.permission': {
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        'auth.user': {
            'Meta': {'object_name': 'User'},
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
        },
        'contenttypes.contenttype': {
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        'tags.comment': {
            'Meta': {'object_name': 'Comment'},
            'comment': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '500'}),
            'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'tag': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['tags.Tag']"}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
        },
        'tags.commontag': {
            'Meta': {'object_name': 'CommonTag'},
            'color': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
            'description': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10000'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
            'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False'}),
            'tag_collection': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['tags.TagCollection']", 'null': 'True', 'blank': 'True'})
        },
        'tags.highlight': {
            'Meta': {'object_name': 'Highlight'},
            'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'highlight': ('django.db.models.fields.CharField', [], {'max_length': '10000'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Page']"}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
        },
        'tags.tag': {
            'Meta': {'object_name': 'Tag'},
            'color': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
            'common_tag': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['tags.CommonTag']", 'null': 'True', 'blank': 'True'}),
            'description': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10000'}),
            'domain': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '300'}),
            'domain_obj': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Domain']", 'null': 'True'}),
            'highlight': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['tags.Highlight']", 'null': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'is_private': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
            'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Page']", 'null': 'True'}),
            'position': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True'}),
            'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'subscribers'", 'symmetrical': 'False', 'to': "orm['auth.User']"}),
            'tag_collection': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['tags.TagCollection']", 'null': 'True', 'blank': 'True'}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'creator'", 'null': 'True', 'to': "orm['auth.User']"}),
            'word_count': ('django.db.models.fields.IntegerField', [], {'default': '0'})
        },
        'tags.tagcollection': {
            'Meta': {'object_name': 'TagCollection'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
            'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False'}),
            'trie_blob': ('django.db.models.fields.TextField', [], {})
        },
        'tags.usertaginfo': {
            'Meta': {'object_name': 'UserTagInfo'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['api.Page']"}),
            'tag': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['tags.Tag']"}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
        },
        'tags.vote': {
            'Meta': {'object_name': 'Vote'},
            'comment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['tags.Comment']", 'null': 'True', 'blank': 'True'}),
            'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'tag': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['tags.Tag']", 'null': 'True', 'blank': 'True'}),
            'voter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
        }
    }

    complete_apps = ['tags']


text:
require 'activerecord/uuid'

class Person < ActiveRecord::Base
  include ActiveRecord::UUID

  belongs_to :user
  belongs_to :account
  has_many :memberships, through: :user
  has_many :messages
  has_many :read_receipts

  validates :email,
    allow_blank: true,
    format: /\A[^@]+@[^@]+\z/,
    uniqueness: {:scope => :account}

  validates :twitter,
    allow_blank: true,
    uniqueness: {:scope => :account}

  before_save :parse_email

  Membership::ROLES.each do |role_name|
    define_method("account_#{role_name}?") do |account|
      account_member_role?(account, role_name)
    end
  end

  def account_member_role?(account, role)
    memberships.where(account_id: account.id, role: role).exists?
  end

  private

  # Private: Make sure we only save the address portion of an email address.
  #
  # Returns nothing.
  def parse_email
    mail = Mail::Address.new(self.email.to_ascii)
    self.email = mail.address
  end

end


text:
'use strict'

const EE = require('events').EventEmitter
const { isMainThread } = require('./worker_threads')

const initWorkers = require('./manager')
const validateOpts = require('./validate')
const noop = require('./noop')
const runTracker = require('./runTracker')
const track = require('./progressTracker')

function init (opts, cb) {
  const cbPassedIn = (typeof cb === 'function')
  if (!cbPassedIn && !opts.forever) {
    if (opts.warmup) {
      return runWithWarmup(opts)
    } else {
      return run(opts)
    }
  } else {
    return _init(opts, null, cb)
  }
}

function run (opts) {
  const tracker = new EE()
  const promise = new Promise((resolve, reject) => {
    _init(opts, tracker, (err, results) => {
      if (err) return reject(err)
      resolve(results)
    })
  })
  tracker.then = promise.then.bind(promise)
  tracker.catch = promise.catch.bind(promise)

  return tracker
}

function runWithWarmup (opts) {
  const warmupOpts = {
    ...opts,
    ...opts.warmup,
    warmupRunning: true,
    renderResultsTable: false
  }
  const mainTracker = new EE()
  const warmUpTracker = new EE()
  const promise = new Promise((resolve, reject) => {
    _init(warmupOpts, warmUpTracker, (err, warmupResults) => {
      if (err) return reject(err)
      _init(opts, mainTracker, (err, results) => {
        if (err) return reject(err)
        results.warmup = warmupResults
        resolve(results)
      })
    })
  })
  mainTracker.then = promise.then.bind(promise)
  mainTracker.catch = promise.catch.bind(promise)
  return mainTracker
}

function _init (opts, tracker, cb) {
  const cbPassedIn = (typeof cb === 'function')
  cb = cb || noop

  tracker = tracker || new EE()

  opts = validateOpts(opts, cbPassedIn)

  function _cb (err, result) {
    if (err) {
      return cbPassedIn ? cb(err) : setImmediate(() => tracker.emit('error', err))
    }

    tracker.emit('done', result)
    cb(null, result)

    if (!err && opts.json) {
      console.log(JSON.stringify(result))
    }
  }

  if (opts instanceof Error) {
    _cb(opts)
    return tracker
  }

  tracker.opts = opts

  if (opts.workers && isMainThread) {
    initWorkers(opts, tracker, _cb)
  } else {
    runTracker(opts, tracker, _cb)
  }

  // if not running via command-line and
  // not rendering json, or if std isn't a tty, track progress
  if (opts[Symbol.for('internal')] && (!opts.json || !process.stdout.isTTY)) track(tracker, opts)

  return tracker
}

module.exports = init


text:
class CreateComableOrderItems < ActiveRecord::Migration
  def change
    create_table :comable_order_items do |t|
      t.references :order, null: false
      t.references :stock, null: false
      t.string :name, null: false
      t.string :code, null: false
      t.integer :price, null: false
      t.string :sku_h_item_name
      t.string :sku_v_item_name
      t.string :sku_h_choice_name
      t.string :sku_v_choice_name
      t.integer :quantity, default: 1, null: false
      t.timestamps null: false
    end

    add_index :comable_order_items, [:order_id, :stock_id], unique: true
  end
end


text:
package com.facebook.drawee.drawable;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.util.DisplayMetrics;

import org.robolectric.RobolectricTestRunner;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;
import static org.mockito.Mockito.*;

@RunWith(RobolectricTestRunner.class)
public class RoundedBitmapDrawableTest {
  private Resources mResources;
  private Bitmap mBitmap;
  private DisplayMetrics mDisplayMetrics;

  RoundedBitmapDrawable mRoundedBitmapDrawable;
  private final Drawable.Callback mCallback = mock(Drawable.Callback.class);

  @Before
  public void setUp() {
    mResources = mock(Resources.class);
    mBitmap = mock(Bitmap.class);
    mDisplayMetrics = mock(DisplayMetrics.class);
    when(mResources.getDisplayMetrics()).thenReturn(mDisplayMetrics);
    mRoundedBitmapDrawable = new RoundedBitmapDrawable(mResources, mBitmap);
    mRoundedBitmapDrawable.setCallback(mCallback);
  }

  @Test
  public void testSetCircle() {
    mRoundedBitmapDrawable.setCircle(true);
    verify(mCallback).invalidateDrawable(mRoundedBitmapDrawable);
    assertTrue(mRoundedBitmapDrawable.isCircle());
  }

  @Test
  public void testSetRadii() {
    mRoundedBitmapDrawable.setRadii(new float[]{1, 2, 3, 4, 5, 6, 7, 8});
    verify(mCallback).invalidateDrawable(mRoundedBitmapDrawable);
    assertArrayEquals(new float[]{1, 2, 3, 4, 5, 6, 7, 8}, mRoundedBitmapDrawable.getRadii(), 0);
  }

  @Test
  public void testSetRadius() {
    mRoundedBitmapDrawable.setRadius(9);
    verify(mCallback).invalidateDrawable(mRoundedBitmapDrawable);
    assertArrayEquals(new float[]{9, 9, 9, 9, 9, 9, 9, 9}, mRoundedBitmapDrawable.getRadii(), 0);
  }

  @Test
  public void testSetBorder() {
    int color = 0x12345678;
    float width = 5;
    mRoundedBitmapDrawable.setBorder(color, width);
    verify(mCallback).invalidateDrawable(mRoundedBitmapDrawable);
    assertEquals(color, mRoundedBitmapDrawable.getBorderColor());
    assertEquals(width, mRoundedBitmapDrawable.getBorderWidth(), 0);
  }

  @Test
  public void testSetPadding() {
    float padding = 10;
    mRoundedBitmapDrawable.setPadding(padding);
    verify(mCallback).invalidateDrawable(mRoundedBitmapDrawable);
    assertEquals(padding, mRoundedBitmapDrawable.getPadding(), 0);
  }

  @Test
  public void testShouldRoundDefault() {
    assertFalse(mRoundedBitmapDrawable.shouldRound());
  }

  @Test
  public void testShouldRoundRadius() {
    mRoundedBitmapDrawable.setRadius(5);
    assertTrue(mRoundedBitmapDrawable.shouldRound());
    mRoundedBitmapDrawable.setRadius(0);
    assertFalse(mRoundedBitmapDrawable.shouldRound());
  }

  @Test
  public void testShouldRoundRadii() {
    mRoundedBitmapDrawable.setRadii(new float[]{0, 0, 0, 0, 0, 0, 0, 1});
    assertTrue(mRoundedBitmapDrawable.shouldRound());
    mRoundedBitmapDrawable.setRadii(new float[]{0, 0, 0, 0, 0, 0, 0, 0});
    assertFalse(mRoundedBitmapDrawable.shouldRound());
  }

  @Test
  public void testShouldRoundCircle() {
    mRoundedBitmapDrawable.setCircle(true);
    assertTrue(mRoundedBitmapDrawable.shouldRound());
    mRoundedBitmapDrawable.setCircle(false);
    assertFalse(mRoundedBitmapDrawable.shouldRound());
  }

  @Test
  public void testShouldRoundBorder() {
    mRoundedBitmapDrawable.setBorder(0xFFFFFFFF, 1);
    assertTrue(mRoundedBitmapDrawable.shouldRound());
    mRoundedBitmapDrawable.setBorder(0x00000000, 0);
    assertFalse(mRoundedBitmapDrawable.shouldRound());
  }

  @Test
  public void testPreservePaintOnDrawableCopy() {
    ColorFilter colorFilter = mock(ColorFilter.class);
    Paint originalPaint = mock(Paint.class);
    BitmapDrawable originalVersion = mock(BitmapDrawable.class);

    originalPaint.setColorFilter(colorFilter);
    when(originalVersion.getPaint()).thenReturn(originalPaint);

    RoundedBitmapDrawable roundedVersion = RoundedBitmapDrawable.fromBitmapDrawable(
        mResources,
        originalVersion);

    assertEquals(
        originalVersion.getPaint().getColorFilter(),
        roundedVersion.getPaint().getColorFilter());
  }
}


text:
@interface NBCWorkflowPanelController : NSWindowController

@property (weak) IBOutlet NSStackView *stackView;

@end


text:
@class DVTFilePath, DVTLocale, IDEContainer<IDELocalizedContainer>, IDEGroup<IDELocalizedGroup>;

@interface _IDELocalizationAddFileReferenceContext : IDELocalizationWorkContext
{
    IDEContainer *_container;
    IDEGroup *_group;
    DVTLocale *_locale;
    DVTFilePath *_filePath;
}

@property(retain) DVTFilePath *filePath; // @synthesize filePath=_filePath;
@property(retain) DVTLocale *locale; // @synthesize locale=_locale;
@property(retain) IDEGroup *group; // @synthesize group=_group;
@property(retain) IDEContainer *container; // @synthesize container=_container;
- (void)primitiveInvalidate;

@end


text:
require 'nokogiri'
require 'scanf'

module OpenNHL
  module GameInfo
    GAME_ID_FORMAT = "%s%d"
    ATTENDANCE_FORMAT = "%s%d,%d"
    TEAM_PROPERTIES =
      {
        visitor:
          {
            score_index:  3,
            game_type:    :away,
            game_type_fr: 'Étr.',
          },
        home:
          {
            score_index:  16,
            game_type:    :home,
            game_type_fr: 'Dom.',
          },
      }

    def self.parse(page)
      props = page.css("td[align='center']")
      info = { game_id: parse_game_id(props) }
      info.merge!(parse_arena_info(props))
      info.merge!(parse_game_time(props))
      TEAM_PROPERTIES.each do |key, value|
        info.merge!(key => parse_team_properties(props, value))
      end
      info
    end

    private

    def self.parse_game_id(props)
      props[12].text.scanf(GAME_ID_FORMAT)[1]
    end

    def self.parse_game_time(props)
      date = props[9].text
      time = props[11].text.split(';')
      {
        start: DateTime.parse(date + time[0]),
        end:   DateTime.parse(date + time[1]),
      }
    end

    def self.parse_arena_info(props)
      arena_info = props[10].text
      attendance = arena_info.scanf(ATTENDANCE_FORMAT)
      attendance = attendance[1] * 1000 + attendance[2]
      at = 'at'
      pos = arena_info.index(at)
      if pos.nil?
        at = '@'
        pos = arena_info.index(at)
      end
      {
        attendance: attendance,
        arena:      arena_info[pos + at.length + 1..-1],
      }
    end

    def self.parse_team_properties(props, value)
      index = value[:score_index]
      team_property = props[index + 2].text
      game_type = value[:game_type].to_s.capitalize
      match_pos = team_property.index('Match')
      game_pos = team_property.index('Game')
      pos = match_pos ? match_pos : game_pos
      games_format =
        if match_pos
          game_type_fr = value[:game_type_fr]
          "Match/Game %d #{game_type_fr}/#{game_type} %d"
        else
          "Game %d #{game_type} Game %d"
        end
      games = team_property[pos..-1].scanf(games_format)
      {
        title:               team_property[0..pos - 1],
        game:                games[0],
        value[:game_type] => games[1],
        score:               props[index].text.to_i,
      }
    end
  end
end


text:
/* DISABLE check_long_lines  */

/*
 * $Header: security_src/public/nzerror.h /st_ldap_db12.1.0.1/1 2012/12/22 01:10:57 tnallath Exp $
 *
* Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
 */

/* ENABLE check_long_lines  */
/*
  NAME
     nzerror.h - error numbers for the Oracle Security Server
  DESCRIPTION
     None.
  PUBLIC FUNCTION(S)
     None.
  PRIVATE FUNCTION(S)
     None.
  NOTES
     A pragma is used to silence olint about the enum value names not being
     unique within 7 characters. This limit is being changed to 30.
  MODIFIED
     tnallath   12/14/12 - fix 8616736 in 12.1
     sourajai   06/20/12 - Error code for csf api enhacements (map, key not
                           present)
     tnallath   03/03/12 - crldp for ssl
     tnallath   02/15/12 - nzupg12: enable fips
     shiahuan   11/04/11 - mscapi errors
     tnallath   03/23/11 - nz upgrade: use rsa-mes
     tnallath   08/18/09 - bug 8612354: error for large crl file
     rchahal    06/12/06 -
     skalyana   01/30/05 -
     rchahal    07/16/04 - add cert label
     rchahal    07/06/04 -
     rchahal    10/15/03 - bug 2513821
     rchahal    08/14/03 - new error range (43000 - 43499)
     skalyana   08/25/03 - Error changes
     rchahal    06/27/03 - RSA errors
     rchahal    05/27/03 - convert wallet
     skalyana   03/07/03 - Move FIPS errors
     rchahal    02/28/03 - bug 2648177
     rchahal    01/20/03 - use sltsky
     rchahal    11/11/02 - pkcs11 support
     skalyana   11/29/02 - Add mutex errors
     akoyfman   11/01/02 - adding crl cache
     rchahal    10/23/02 - crldp error
     rchahal    10/15/02 - fetch crl from ldap
     rchahal    10/07/02 - crl support
     akoyfman   10/16/02 - Update with SSL PLus 4.2 errors
     skalyana   10/04/02 - Certicom SSL Plus 4.2 Upgrade changes
     akoyfman   08/06/02 - adding sso wallet errors
     akoyfman   07/12/02 - adding secret store errors
     skalyana   07/07/02 - Add more errors for FIPS self tests
     skalyana   07/01/02 - Add more errors
     skalyana   06/03/02 - Add NZ error for self test failure.
     ajacobs    02/22/01 - Add some entrust errors
     vle        02/09/01 - add error mesg
     lkethana   08/11/00 - Extension Errors
     lkethana   07/30/00 - add pkcs12 errors
     lkethana   06/17/00 - mult cert errors
     lkethana   06/11/00 - multiple cert support
     rturlapa   03/29/00 - Add error meesage for Entrust Login failure.
     rwessman   07/07/99 - Deleted include of sslerrs.h. It caused the RDBMS bu
     rwessman   07/02/99 - fixed merge errors
     rwessman   07/01/99 - moved NZOS errors to nzerror to make them visible
     supriya    12/16/98 - add new error for cert chain.
     arswamin   12/04/98 - add NZERROR_NO_MATCHING_PRIVATE_KEY
     qdinh      11/12/98 - add NZERROR_VALIDITY_EXPIRED.
     arswamin   06/17/98 - add INIT_FAILED
     sdange     06/10/98 - change wrong password to bad password
     amthakur   06/09/98 - adding error messages
     wliau      03/10/97 - Add new error message for snzdfo.c.
     rwessman   03/14/97 - Consolidated PL/SQL toolkit errors into generic erro
     rwessman   02/26/97 - Added NZERROR_UNSUPPORTED. Corrected values of
                           errors outside the valid range.
     asriniva   03/02/97 - Fix olint warning
     rwessman   02/26/97 - Added NZERROR_UNSUPPORTED
     rwessman   01/02/97 - Changed PLSQL package errors to be TK_PLSQL to
                           separate them from the errors generated by the
                           Oracle interface.
     rwessman   12/30/96 - Merged in PL/SQL toolkit errors
     sdange     11/14/96 - (Added NZERROR_DECRYPT_FAILED to the enum list)
     rwessman   12/02/96 -
     rwessman   11/25/96 - Added error messages for PL/SQL functions.
     asriniva   10/31/96 - Include oratypes.h
     asriniva   10/29/96 - Fix numbering.
     asriniva   10/29/96 - Fix error numbers
     asriniva   10/29/96 - Correct type-o
     asriniva   10/28/96 - Add more TK errors
     asriniva   10/28/96 - Convert OKAPI errors to TK errors.
     rwessman   10/17/96 - still more OSS TK errors
     asriniva   10/16/96 - OKAPI errors
     asriniva   10/15/96 - OSSTK errors
     rwessman   10/15/96 - Added more OSS TK errors
     asriniva   10/09/96 - Add OSSTK errors.
     rwessman   09/05/96 - Added errors for PL/SQL functions.
     wliau      09/05/96 - correct error numbers.
     $Log:  $
 * Revision 1.26  1996/07/15  23:07:23  wliau
 * Added NZERROR_AUTH_SHARED_MEMORY
 *
 * Revision 1.25  1996/07/01  20:40:15  asriniva
 * Finished RSA verify/sign.
 *
 * Revision 1.24  1996/06/27  20:39:41  rwessman
 * Added more errors.
 *
 * Revision 1.23  1996/05/31  17:33:40  rwessman
 * Updated nzerror.h to contain bug # for olint enum bug.
 *
 * Revision 1.22  1996/05/31  17:12:30  rwessman
 * Assigned values to the various errors.
 *
 * Revision 1.21  1996/05/13  20:46:58  ggilchri
 * Added more attribute related error conditions
 *
*/

#ifndef NZERROR_ORACLE
# define NZERROR_ORACLE

#ifndef ORATYPES
# include "./oratypes.h"
#endif /* ORATYPES */

/*
** Errors - when an error is added here, a message corresponding to the
** error number must be added to the message file.
** New errors must be assigned numbers, otherwise the compiler can assign any
** value that it wants, which may lead to invalid error numbers being
** generated.
** The number range currently assigned to the OSS is 28750 - 29249
** New number range 43000 - 43499
*/

typedef enum nzerror
{
  NZERROR_OK = 0,
  NZERROR_GENERIC = 28750,                          /* A catchall for errors */
  NZERROR_NO_MEMORY = 28751,                               /* No more memory */
  NZERROR_DATA_SOURCE_INIT_FAILED = 28752,     /* Failed to init data source */
  NZERROR_DATA_SOURCE_TERM_FAILED = 28753,/* Failed to terminate data source */
  NZERROR_OBJECT_STORE_FAILED = 28754, /* Store object in data source failed */
  NZERROR_OBJECT_GET_FAILED = 28755,
                                 /* Failed to obtain object from data source */
  NZERROR_MEMORY_ALLOC_FAILED = 28756,
                                       /* Callback failed to allocate memory */
  NZERROR_MEMORY_ALLOC_0_BYTES = 28757,
                                   /* Attempted to ask for 0 bytes of memory */
  NZERROR_MEMORY_FREE_FAILED = 28758,
                                           /* Callback failed to free memory */
  NZERROR_FILE_OPEN_FAILED = 28759,
                                                      /* Open of file failed */
  NZERROR_LIST_CREATION_FAILED = 28760,
                                                  /* Creation of list failed */
  NZERROR_NO_ELEMENT = 28761,
                                                    /* No list element found */
  NZERROR_ELEMENT_ADD_FAILED = 28762,
                                          /* Addition of list element failed */
  NZERROR_PARAMETER_BAD_TYPE = 28763,
                                   /* Retrieval of an unknown parameter type */
  NZERROR_PARAMETER_RETRIEVAL = 28764,      /* Retrieval of parameter failed */

  NZERROR_NO_LIST = 28765,                /* Data method list does not exist */
  NZERROR_TERMINATE_FAIL = 28766,                     /* Failed to terminate */
  NZERROR_BAD_VERSION_NUMBER = 28767,                  /* Bad version number */
  NZERROR_BAD_MAGIC_NUMBER = 28768,                      /* Bad magic number */
  NZERROR_METHOD_NOT_FOUND = 28769,
                           /* Data retrieval method specified does not exist */
  NZERROR_ALREADY_INITIALIZED = 28770,
                                    /*The data source is already initialized */
  NZERROR_NOT_INITIALIZED = 28771,     /* The data source is not initialized */
  NZERROR_BAD_FILE_ID = 28772,                             /* File ID is bad */
  NZERROR_WRITE_MAGIC_VERSION = 28773,  /* Failed to write magic and version */
  NZERROR_FILE_WRITE_FAILED = 28774,              /* Failed to write to file */
  NZERROR_FILE_CLOSE_FAILED = 28775,                 /* Failed to close file */
  NZERROR_OUTPUT_BUFFER_TOO_SMALL = 28776,
                           /* The buffer supplied by the caller is too small */
  NZERROR_BINDING_CREATION_FAILED = 28777,/* NL failed in creating a binding */
  NZERROR_PARAMETER_MALFORMED = 28778,    /* A parameter was in a bad format */
  NZERROR_PARAMETER_NO_METHOD = 28779,
                                  /* No method was specified for a data type */
  NZERROR_BAD_PARAMETER_METHOD = 28780,      /* Illegal method for data type */
  NZERROR_PARAMETER_NO_DATA = 28781,    /* No method specified when required */
  NZERROR_NOT_ALLOCATED = 28782,             /* Data source is not allocated */
  NZERROR_INVALID_PARAMETER = 28783,               /* Invalid parameter name */
  NZERROR_FILE_NAME_TRANSLATION = 28784,/* Could not translate OSD file name */
  NZERROR_NO_SUCH_PARAMETER = 28785,   /* Selected parameter is non-existent */

  NZERROR_DECRYPT_FAILED = 28786,
                                 /* Encrypted private key decryption failure */
  NZERROR_ENCRYPT_FAILED = 28787,     /* Private key encryption failed */

  NZERROR_INVALID_INPUT = 28788,     /* Incorrect input or unknown error */

  NZERROR_NAME_TYPE_NOT_FOUND = 28789,
                                  /* Type of name requested is not available */
  NZERROR_NLS_STRING_OPEN_FAILED = 28790,
                                        /* Failure to generate an NLS string */
  NZERROR_CERTIFICATE_VERIFY = 28791,      /* Failed to verify a certificate */
  NZERROR_OCI_PLSQL_FAILED = 28792,
                                 /* an OCI call to process some plsql failed */
  NZERROR_OCI_BIND_FAILED = 28793,
                              /* an OCI call to bind an internal var. failed */
  NZERROR_ATTRIBUTE_INIT = 28794,           /* failed to init role retrieval */
  NZERROR_ATTRIBUTE_FINISH_FAILED = 28795,/* Did not complete role retrieval */
  NZERROR_UNSUPPORTED_METHOD = 28796, /* Data method specified not supported */
  NZERROR_INVALID_KEY_DATA_TYPE = 28797,
                                      /* Invalid data type specified for key */
  NZEROR_BIND_SUBKEY_COUNT = 28798,
       /* Number of sub-keys to bind does not match count in initialized key */
  NZERROR_AUTH_SHARED_MEMORY = 28799,
    /* Failed to retreieve authentication information from the shared memory */
  NZERROR_RIO_OPEN = 28800,                               /* RIO Open Failed */
  NZERROR_RIO_OBJECT_TYPE = 28801,                /* RIO object type invalid */
  NZERROR_RIO_MODE = 28802,                              /* RIO mode invalid */
  NZERROR_RIO_IO = 28803,                     /* RIO io set or numberinvalid */
  NZERROR_RIO_CLOSE = 28804,                             /* RIO close failed */
  NZERROR_RIO_RETRIEVE = 28805,                       /* RIO retrieve failed */
  NZERROR_RIO_STORE = 28806,                             /* RIO store failed */
  NZERROR_RIO_UPDATE = 28807,                           /* RIO update failed */
  NZERROR_RIO_INFO = 28808,                               /* RIO info failed */
  NZERROR_RIO_DELETE = 28809,                           /* RIO delete failed */
  NZERROR_KD_CREATE = 28810,                 /* Key descriptor create failed */
  NZERROR_RIO_ACCESS_DESCRIPTOR = 28811,        /* access descriptor invalid */
  NZERROR_RIO_RECORD = 28812,                              /* record invalid */
  NZERROR_RIO_RECORD_TYPE = 28813,    /* record type and AD type not matched */
  NZERROR_PLSQL_ORACLE_TO_REAL = 28814,
          /* A number passed to PL/SQL could not be converted to real format */
  NZERROR_PLSQL_REAL_TO_ORACLE = 28815,
       /* A number in machine format could not be converted to Oracle format */
  NZERROR_TK_PLSQL_NO_PASSWORD = 28816,
                         /* A password was not provided to a PL/SQL function */
  NZERROR_TK_PLSQL_GENERIC = 28817,
                                      /* A PL/SQL function returned an error */
  NZERROR_TK_PLSQL_NO_CONTEXT = 28818,
               /* The package context was not specified to a PL/SQL function */
  NZERROR_TK_PLSQL_NO_DIST_NAME = 28819,
      /* The user's distinguished name was not provided to a PL/SQL function */
  NZERROR_TK_PLSQL_NO_STATE = 28820,
/* The state of either a signature or decryption/encryption was not provided */
  NZERROR_TK_PLSQL_NO_INPUT = 28821,
                       /* An input buffer was specified to a PL/SQL function */
  NZERROR_TK_PLSQL_NO_SEED = 28822,
         /* No seed was specified to the PL/SQL seed initialization function */
  NZERROR_TK_PLSQL_NO_BYTES = 28823,
  /* Number of bytes was not specified to the PL/SQL random number generator */
  NZERROR_TK_INVALID_STATE = 28824,
                     /* Invalid encryption/decryption/signature state passed */
  NZERROR_TK_PLSQL_NO_ENG_FUNC = 28825,
                                  /* No crypto engine function was passed in */
  NZERROR_TK_INV_ENG_FUNC = 28826,
                          /* An invalid crypto engine function was passed in */
  NZERROR_TK_INV_CIPHR_TYPE = 28827,
                                     /* An invalid cipher type was passed in */
  NZERROR_TK_INV_IDENT_TYPE = 28828,
                                   /* An invalid identity type was specified */
  NZERROR_TK_PLSQL_NO_CIPHER_TYPE = 28829,
                                             /* No cipher type was specified */
  NZERROR_TK_PLSQL_NO_IDENT_TYPE = 28830,
                                           /* No identity type was specified */
  NZERROR_TK_PLSQL_NO_DATA_FMT = 28831,
                                        /* No data unit format was specified */
  NZERROR_TK_INV_DATA_FMT = 28832,
                        /* Invalid data unit format was provided to function */
  NZERROR_TK_PLSQL_INSUFF_INFO = 28833,
       /* Not enough info (usually parameters) provided to a PL/SQL function */
  NZERROR_TK_PLSQL_BUF_TOO_SMALL = 28834,
           /* Buffer provided by PL/SQL is too small for data to be returned */
  NZERROR_TK_PLSQL_INV_IDENT_DESC = 28835,
                             /* Identity descriptor not present or too small */
  NZERROR_TK_PLSQL_WALLET_NOTOPEN = 28836,
                                           /* Wallet has not been opened yet */
  NZERROR_TK_PLSQL_NO_WALLET = 28837,
                        /* No wallet descriptor specified to PL/SQL function */
  NZERROR_TK_PLSQL_NO_IDENTITY = 28838,
                      /* No identity descriptor specified to PL/SQL function */
  NZERROR_TK_PLSQL_NO_PERSONA = 28839,
                   /* No persona descriptor was specified to PL/SQL function */
  NZERROR_TK_PLSQL_WALLET_OPEN = 28840,
                                                /* Wallet was already opened */
  NZERROR_UNSUPPORTED = 28841,                 /* Operation is not supported */
  NZERROR_FILE_BAD_PERMISSION = 28842,      /* Bad file permission specified */
  NZERROR_FILE_OSD_ERROR = 28843,             /* OSD error when opening file */
  NZERROR_NO_WALLET  = 28844,  /* cert + privkey + tp files do not exist */
  NZERROR_NO_CERTIFICATE_ALERT    = 28845,  /* no certificate */
  NZERROR_NO_PRIVATE_KEY          = 28846,  /* no private-key */
  NZERROR_NO_CLEAR_PRIVATE_KEY_FILE   = 28847,   /* no clear key-file */
  NZERROR_NO_ENCRYPTED_PRIVATE_KEY_FILE = 28848,  /* no encrypted priv key */
  NZERROR_NO_TRUSTPOINTS     = 28849,       /* no trustpoints */
  NZERROR_NO_CLEAR_TRUSTPOINT_FILE    = 28850,   /* no clear trustpoints */
  NZERROR_NO_ENCRYPTED_TRUSTPOINT_FILE = 28851,   /* no encrypted trustpoints */
  NZERROR_BAD_PASSWORD    = 28852,   /* bad password */
  NZERROR_INITIALIZATION_FAILED   =  28853, /* init failed or
                      module loading failed */
  /******************************* SSL ERRORS ********************************/
  /*
   * In order to allow SSL errors to be mapped to Oracle errors, space is
   * provided here. One Oracle error is provided for each SSL error to make
   * error handling easier. A macro is provided to do the conversion.
   * NOTE: ANY CHANGE IN SSL ERRORS MUST BE REFLECTED HERE.
   * To add an SSL error, use the following formula to calculate the Oracle
   * error:
   * new_oracle_error = (new_ssl_error - SSLMemoryError) + NZERROR_SSLMemoryErr
   * or numerically:
   * new_oracle_error = (new_ssl_error - -7000) + 28854
   */
  NZERROR_SSLMemoryErr = 28854,
  NZERROR_SSLUnsupportedErr = 28855,
  NZERROR_SSLOverflowErr = 28856,
  NZERROR_SSLUnknownErr = 28857,
  NZERROR_SSLProtocolErr = 28858,
  NZERROR_SSLNegotiationErr = 28859,
  NZERROR_SSLFatalAlert = 28860,
  NZERROR_SSLWouldBlockErr = 28861,
  NZERROR_SSLIOErr = 28862,
  NZERROR_SSLSessionNotFoundErr = 28863,
  NZERROR_SSLConnectionClosedGraceful = 28864,
  NZERROR_SSLConnectionClosedError = 28865,
  NZERROR_ASNBadEncodingErr = 28866,
  NZERROR_ASNIntegerTooBigErr = 28867,
  NZERROR_X509CertChainInvalidErr = 28868,
  NZERROR_X509CertExpiredErr = 28869,
  NZERROR_X509NamesNotEqualErr = 28870,
  NZERROR_X509CertChainIncompleteErr = 28871,
  NZERROR_X509DataNotFoundErr = 28872,
  NZERROR_SSLBadParameterErr = 28873,
  NZERROR_SSLIOClosedOverrideGoodbyeKiss = 28874,
  NZERROR_X509MozillaSGCErr  =  28875,
  NZERROR_X509IESGCErr       =  28876,
  NZERROR_ImproperServerCredentials = 28877,
  NZERROR_ImproperClientCredentials = 28878,
  NZERROR_NoProtocolSideSet = 28879,
  NZERROR_setPersonaFailed = 28880,
  NZERROR_setCertFailed = 28881,
  NZERROR_setVKeyFailed = 28882,
  NZERROR_setTPFailed = 28883,
  NZERROR_BadCipherSuite = 28884,
  NZERROR_NoKeyPairForKeyUsage = 28885,

/* ============>>>  ENTRUST ERRORS */
  NZERROR_EntrustLoginFailed = 28890,
  NZERROR_EntrustGetInfoFailed = 28891,
  NZERROR_EntrustLoadCertificateFailed = 28892,
  NZERROR_EntrustGetNameFailed = 28893,

/* ============>>>  MSCAPI ERRORS */
  NZERROR_OPEN_WINDOWS_CERT_STORE_FAILED = 28900,

/* ============>>> NZERRORS CONTINUED */
  NZERROR_CertNotInstalled = 29000,
  NZERROR_ServerDNMisMatched = 29002,
  NZERROR_ServerDNMisConfigured = 29003,

/* ============>>> PKI VENDORS ERRORS 29050 - 29099 */

/* ============>>> SSL Errors CONTINUED */
  NZERROR_CIC_ERR_SSL_ALERT_CB_FAILURE = 29004,
  NZERROR_CIC_ERR_SSL_BAD_CERTIFICATE = 29005,
  NZERROR_CIC_ERR_SSL_BAD_CERTIFICATE_REQUEST = 29006,
  NZERROR_CIC_ERR_SSL_BAD_CLEAR_KEY_LEN = 29007,
  NZERROR_CIC_ERR_SSL_BAD_DHPARAM_KEY_LENGTH = 29008,
  NZERROR_CIC_ERR_SSL_BAD_ENCRYPTED_KEY_LEN = 29009,
  NZERROR_CIC_ERR_SSL_BAD_EXPORT_KEY_LENGTH = 29010,
  NZERROR_CIC_ERR_SSL_BAD_FINISHED_MESSAGE = 29011,
  NZERROR_CIC_ERR_SSL_BAD_KEY_ARG_LEN = 29012,
  NZERROR_CIC_ERR_SSL_BAD_MAC = 29013,
  NZERROR_CIC_ERR_SSL_BAD_MAX_FRAGMENT_LENGTH_EXTENSION = 29014,
  NZERROR_CIC_ERR_SSL_BAD_MESSAGE_LENGTH = 29015,
  NZERROR_CIC_ERR_SSL_BAD_PKCS1_PADDING = 29016,
  NZERROR_CIC_ERR_SSL_BAD_PREMASTER_SECRET_LENGTH = 29017,
  NZERROR_CIC_ERR_SSL_BAD_PREMASTER_SECRET_VERSION = 29018,
  NZERROR_CIC_ERR_SSL_BAD_PROTOCOL_VERSION = 29019,
  NZERROR_CIC_ERR_SSL_BAD_RECORD_LENGTH = 29020,
  NZERROR_CIC_ERR_SSL_BAD_SECRET_KEY_LEN = 29021,
  NZERROR_CIC_ERR_SSL_BAD_SIDE = 29022,
  NZERROR_CIC_ERR_SSL_BUFFERS_NOT_EMPTY = 29023,
  NZERROR_CIC_ERR_SSL_CERTIFICATE_VALIDATE_FAILED = 29024,
  NZERROR_CIC_ERR_SSL_CERT_CHECK_CALLBACK = 29025,
  NZERROR_CIC_ERR_SSL_DECRYPT_FAILED = 29026,
  NZERROR_CIC_ERR_SSL_ENTROPY_COLLECTION = 29027,
  NZERROR_CIC_ERR_SSL_FAIL_SERVER_VERIFY = 29028,
  NZERROR_CIC_ERR_SSL_HANDSHAKE_ALREADY_COMPLETED = 29029,
  NZERROR_CIC_ERR_SSL_HANDSHAKE_REQUESTED = 29030,
  NZERROR_CIC_ERR_SSL_HANDSHAKE_REQUIRED = 29031,
  NZERROR_CIC_ERR_SSL_INCOMPLETE_IDENTITY = 29032,
  NZERROR_CIC_ERR_SSL_INVALID_PFX = 29033,
  NZERROR_CIC_ERR_SSL_NEEDS_CIPHER_OR_CLIENTAUTH = 29034,
  NZERROR_CIC_ERR_SSL_NEEDS_PRNG = 29035,
  NZERROR_CIC_ERR_SSL_NOT_SUPPORTED = 29036,
  NZERROR_CIC_ERR_SSL_NO_CERTIFICATE = 29037,
  NZERROR_CIC_ERR_SSL_NO_MATCHING_CERTIFICATES = 29038,
  NZERROR_CIC_ERR_SSL_NO_MATCHING_CIPHER_SUITES = 29039,
  NZERROR_CIC_ERR_SSL_NO_SUPPORTED_CIPHER_SUITES = 29040,
  NZERROR_CIC_ERR_SSL_NULL_CB = 29041,
  NZERROR_CIC_ERR_SSL_READ_BUFFER_NOT_EMPTY = 29042,
  NZERROR_CIC_ERR_SSL_READ_REQUIRED = 29043,
  NZERROR_CIC_ERR_SSL_RENEGOTIATION_ALREADY_REQUESTED = 29044,
  NZERROR_CIC_ERR_SSL_RENEGOTIATION_REFUSED = 29045,
  NZERROR_CIC_ERR_SSL_RESUMABLE_SESSION = 29046,
  NZERROR_CIC_ERR_SSL_TLS_EXTENSION_MISMATCH = 29047,
  NZERROR_CIC_ERR_SSL_UNEXPECTED_MSG = 29048,
  NZERROR_CIC_ERR_SSL_UNKNOWN_RECORD = 29049,
  NZERROR_CIC_ERR_SSL_UNSUPPORTED_CLIENT_AUTH_MODE = 29050,
  NZERROR_CIC_ERR_SSL_UNSUPPORTED_PUBKEY_TYPE = 29051,
  NZERROR_CIC_ERR_SSL_WRITE_BUFFER_NOT_EMPTY = 29052,
  NZERROR_CIC_ERR_PKCS12_MISSING_ALG = 29053,
  NZERROR_CIC_ERR_PKCS_AUTH_FAILED = 29054,
  NZERROR_CIC_ERR_PKCS_BAD_CONTENT_TYPE = 29055,
  NZERROR_CIC_ERR_PKCS_BAD_INPUT = 29056,
  NZERROR_CIC_ERR_PKCS_BAD_PADDING = 29057,
  NZERROR_CIC_ERR_PKCS_BAD_SN = 29058,
  NZERROR_CIC_ERR_PKCS_BAD_SN_LENGTH = 29059,
  NZERROR_CIC_ERR_PKCS_BAD_VERSION = 29060,
  NZERROR_CIC_ERR_PKCS_BASE = 29061,
  NZERROR_CIC_ERR_PKCS_FIELD_NOT_PRESENT = 29062,
  NZERROR_CIC_ERR_PKCS_NEED_CERTVAL = 29063,
  NZERROR_CIC_ERR_PKCS_NEED_PASSWORD = 29064,
  NZERROR_CIC_ERR_PKCS_NEED_PKC = 29065,
  NZERROR_CIC_ERR_PKCS_NEED_PRV_KEY = 29066,
  NZERROR_CIC_ERR_PKCS_NEED_TRUSTED = 29067,
  NZERROR_CIC_ERR_PKCS_UNSUPPORTED_CERT_FORMAT = 29068,
  NZERROR_CIC_ERR_PKCS_UNSUP_PRVKEY_TYPE = 29069,
  NZERROR_CIC_ERR_CODING_BAD_PEM = 29070,
  NZERROR_CIC_ERR_CODING_BASE = 29071,
  NZERROR_CIC_ERR_DER_BAD_ENCODING = 29072,
  NZERROR_CIC_ERR_DER_BAD_ENCODING_LENGTH = 29073,
  NZERROR_CIC_ERR_DER_BASE = 29074,
  NZERROR_CIC_ERR_DER_ELEMENT_TOO_LONG = 29075,
  NZERROR_CIC_ERR_DER_INDEFINITE_LENGTH = 29076,
  NZERROR_CIC_ERR_DER_NO_MORE_ELEMENTS = 29077,
  NZERROR_CIC_ERR_DER_OBJECT_TOO_LONG = 29078,
  NZERROR_CIC_ERR_DER_TAG_SIZE = 29079,
  NZERROR_CIC_ERR_DER_TIME_OUT_OF_RANGE = 29080,
  NZERROR_CIC_ERR_DER_UNUSED_BITS_IN_BIT_STR = 29081,
  NZERROR_CIC_ERR_GENERAL_BASE = 29082,
  NZERROR_CIC_ERR_HASH_BASE = 29083,
  NZERROR_CIC_ERR_ILLEGAL_PARAM = 29084,
  NZERROR_CIC_ERR_MEM_NOT_OURS = 29085,
  NZERROR_CIC_ERR_MEM_OVERRUN = 29086,
  NZERROR_CIC_ERR_MEM_UNDERRUN = 29087,
  NZERROR_CIC_ERR_MEM_WAS_FREED = 29088,
  NZERROR_CIC_ERR_NOT_FOUND = 29090,
  NZERROR_CIC_ERR_NO_PTR = 29091,
  NZERROR_CIC_ERR_TIMEOUT = 29092,
  NZERROR_CIC_ERR_UNIT_MASK = 29093,
  NZERROR_CIC_ERR_BAD_CTX = 29094,
  NZERROR_CIC_ERR_BAD_INDEX = 29095,
  NZERROR_CIC_ERR_BAD_LENGTH = 29096,
  NZERROR_CIC_ERR_CODING_BAD_ENCODING = 29097,
  NZERROR_CIC_ERR_SSL_NO_CLIENT_AUTH_MODES = 29098,

  /* ============>>> PKCS12 error 29100 - 29149  */

  NZERROR_LOCKEYID_CREATE_FAILED = 29100,
  NZERROR_P12_ADD_PVTKEY_FAILED = 29101,
  NZERROR_P12_ADD_CERT_FAILED = 29102,
  NZERROR_P12_WLT_CREATE_FAILED = 29103,
  NZERROR_P12_ADD_CERTREQ_FAILED = 29104,
  NZERROR_P12_WLT_EXP_FAILED = 29105,
  NZERROR_P12_WLT_IMP_FAILED = 29106,
  NZERROR_P12_CREATE_FAILED = 29107,
  NZERROR_P12_DEST_FAILED = 29107,
  NZERROR_P12_RAND_ERROR = 29108,
  NZERROR_P12_PVTKEY_CRT_FAILED = 29109,
  NZERROR_P12_INVALID_BAG = 29110,
  NZERROR_P12_INVALID_INDEX = 29111,
  NZERROR_P12_GET_CERT_FAILED = 29112,
  NZERROR_P12_GET_PVTKEY_FAILED = 29113,
  NZERROR_P12_IMP_PVTKEY_FAILED = 29114,
  NZERROR_P12_EXP_PVTKEY_FAILED = 29115,
  NZERROR_P12_GET_ATTRIB_FAILED = 29116,
  NZERROR_P12_ADD_ATTRIB_FAILED = 29117,
  NZERROR_P12_CRT_ATTRIB_FAILED = 29118,
  NZERROR_P12_IMP_CERT_FAILED = 29119,
  NZERROR_P12_EXP_CERT_FAILED = 29120,
  NZERROR_P12_ADD_SECRET_FAILED = 29121,
  NZERROR_P12_ADD_PKCS11INFO_FAILED = 29122,
  NZERROR_P12_GET_PKCS11INFO_FAILED = 29123,
  NZERROR_P12_MULTIPLE_PKCS11_LIBNAME = 29124,
  NZERROR_P12_MULTIPLE_PKCS11_TOKENLABEL = 29125,
  NZERROR_P12_MULTIPLE_PKCS11_TOKENPASSPHRASE = 29126,
  NZERROR_P12_UNKNOWN_PKCS11INFO = 29127,
  NZERROR_P12_PKCS11_LIBNAME_NOT_SET = 29128,
  NZERROR_P12_PKCS11_TOKENLABEL_NOT_SET = 29129,
  NZERROR_P12_PKCS11_TOKENPASSPHRASE_NOT_SET = 29130,
  NZERROR_P12_MULTIPLE_PKCS11_CERTLABEL = 29131,

/* ===========>>> SSL Errors CONTINUED 29135 - 29139 */
  NZERROR_CIC_ERR_RANDOM = 29135,
  NZERROR_CIC_ERR_SMALL_BUFFER = 29136,
  NZERROR_CIC_ERR_SSL_BAD_CONTEXT = 29137,

/* ==========>>> Mutex Errors 29138 - 29139 */
  NZERROR_MUTEX_INITIALIZE_FAILED = 29138,
  NZERROR_MUTEX_DESTROY_FAILED = 29139,

/* ============>>> EXTENSIONS Errors 29140 - 29149 */
  NZERROR_BS_CERTOBJ_CREAT_FAILED = 29140,
  NZERROR_BS_DER_IMP_FAILED = 29141,
  NZERROR_CERT_NAME_ERROR = 29142,
  NZERROR_EXT_ERROR = 29143,   /* ext processing failed */

/* ============>>> FIPS ERRORS 29150 - 29175 */
  NZERROR_DES_SELF_TEST_FAILED = 29150,
  NZERROR_3DES_SELF_TEST_FAILED = 29151,
  NZERROR_SHA_SELF_TEST_FAILED = 29152,
  NZERROR_RSA_SELF_TEST_FAILED = 29153,
  NZERROR_DRNG_SELF_TEST_FAILED = 29154,
  NZERROR_CKEYPAIR_SELF_TEST_FAILED = 29155,
  NZERROR_CRNG_SELF_TEST_FAILED = 29156,
  NZERROR_FIPS_PATHNAME_ERROR = 29157,
  NZERROR_FIPS_LIB_OPEN_FAILED = 29158,
  NZERROR_FIPS_LIB_READ_ERROR = 29159,
  NZERROR_FIPS_LIB_DIFFERS = 29160,
  NZERROR_DAC_SELF_TEST_FAILED = 29161,
  NZERROR_NONFIPS_CIPHERSUITE = 29162,
  NZERROR_VENDOR_NOT_SUPPORTED_FIPS_MODE = 29163,
  NZERROR_EXTERNAL_PKCS12_NOT_SUPPORTED_FIPS_MODE = 29164,
  NZERROR_AES_SELF_TEST_FAILED = 29165,
  NZERROR_FIPS_BAD_KEYSIZE = 29166,

/* ============>>> CRL ERRORS 29176 - 29200 */
  NZERROR_CRL_SIG_VERIFY_FAILED = 29176, /*CRL signature verification failed*/
  NZERROR_CERT_NOT_IN_CRL = 29177,
                                 /*Cert is not in CRL - cert is not revoked*/
  NZERROR_CERT_IN_CRL = 29178,           /*Cert is in CRL - cert is revoked*/
  NZERROR_CERT_IN_CRL_CHECK_FAILED = 29179, /*Cert revocation check failed */
  NZERROR_INVALID_CERT_STATUS_PROTOCOL = 29180,
  NZERROR_LDAP_OPEN_FAILED = 29181,  /* ldap_open failed */
  NZERROR_LDAP_BIND_FAILED = 29182,  /* ldap_bind failed */
  NZERROR_LDAP_SEARCH_FAILED = 29183,  /* ldap_search failed */
  NZERROR_LDAP_RESULT_FAILED = 29184,  /* ldap_result failed */
  NZERROR_LDAP_FIRSTATTR_FAILED = 29185,  /* ldap_first_attribute failed */
  NZERROR_LDAP_GETVALUESLEN_FAILED = 29186,  /* ldap_get_values_len failed */
  NZERROR_LDAP_UNSUPPORTED_VALMEC = 29187,
                                       /* unsupported validation mechanism */
  NZERROR_LDAP_COUNT_ENTRIES_FAILED = 29188,/* ldap_count_entries failed */
  NZERROR_LDAP_NO_ENTRY_FOUND = 29189, /* No entry found in OID */
  NZERROR_LDAP_MULTIPLE_ENTRIES_FOUND = 29190, /* Multiple entries in OID*/
  NZERROR_OID_INFO_NOT_SET = 29191,
  NZERROR_LDAP_VALMEC_NOT_SET = 29192,
                                     /* Validation mechanism not set in OID*/
  NZERROR_CRLDP_NO_CRL_FOUND = 29193,
                                     /* No CRL found using CRLDP mechanism */
  NZERROR_CRL_NOT_IN_CACHE = 29194,  /* No CRL found in the cache*/
  NZERROR_CRL_EXPIRED = 29195,       /* CRL nextUpdate time is in the past */
  NZERROR_CRL_FILETOOBIG = 29196,    /* CRL file is too large */
/* ============>>>  ADD ERRORS HERE -- NOTE DECREASING numbers */
  NZERROR_DN_MATCH  =            29222,  /* for nztCompareDN */
  NZERROR_CERT_CHAIN_CREATION  = 29223,  /* unable to create a cert chain
                 * with the existing TPs for the
                 * cert to be installed.
                 */
  NZERROR_NO_MATCHING_CERT_REQ = 29224,  /* No matching cert_req was
                 * found the corresponding to
                 * the privatekey which
                 * matches the cert to be
                 * installed */
  NZERROR_CERT_ALREADY_INSTALLED = 29225, /* we are attempting to
                  * install a cert again into
                  * a persona which already
                  * has it installed.
                  */
  NZERROR_NO_MATCHING_PRIVATE_KEY = 29226, /* could not find a matching
                   * persona-private(privatekey) in
                   * the Persona, for the given
                   * cert(public key).
                   */
  NZERROR_VALIDITY_EXPIRED = 29227, /* certificate validity date expired */
  NZERROR_TK_BYTES_NEEDED = 29228,   /* Couldn't determine # of bytes needed */
  NZERROR_TK_BAD_MAGIC_NUMBER = 29229,
                     /* Magic number found in header does not match expected */
  NZERROR_TK_BAD_HEADER_LENGTH = 29230,
                /* Header length passed in not sufficient for message header */
  NZERROR_TK_CE_INIT = 29231,          /* Crypto engine failed to initialize */
  NZERROR_TK_CE_KEYINIT = 29232,  /* Crypto engine key initialization failed */
  NZERROR_TK_CE_ENCODE_KEY = 29233,           /* Count not encode key object */
  NZERROR_TK_CE_DECODE_KEY = 29234,      /* Could not decode key into object */
  NZERROR_TK_CE_GEYKEYINFO = 29235,  /* Crypto engine failed to get key info */
  NZERROR_TK_SEED_RANDOM = 29236,   /* Couldn't seed random number generator */
  NZERROR_TK_CE_ALGFINISH = 29237,              /* Couldn't finish algorithm */
  NZERROR_TK_CE_ALGAPPLY = 29238,        /* Couldn't apply algorithm to data */
  NZERROR_TK_CE_ALGINIT = 29239,           /* Couldn't init CE for algorithm */
  NZERROR_TK_ALGORITHM = 29240,      /* Have no idea what algorithm you want */
  NZERROR_TK_CANNOT_GROW = 29241,         /* Cannot grow output buffer block */
  NZERROR_TK_KEYSIZE = 29242,               /* Key not large enough for data */
  NZERROR_TK_KEYTYPE = 29243,                           /* Unknown key type. */

  NZERROR_TK_PLSQL_NO_WRL = 29244,
                 /* Wallet resource locator not specified to PL/SQL function */

  NZERROR_TK_CE_FUNC = 29245,              /* Unknown crypto engine function */
  NZERROR_TK_TDU_FORMAT = 29246,                       /* Unknown TDU format */
  NZERROR_TK_NOTOPEN = 29247,                         /* Object must be open */
  NZERROR_TK_WRLTYPE = 29248,                                /* Bad WRL type */
  NZERROR_TK_CE_STATE = 29249,  /* Bad state specified for the crypto engine */

  /* After 29249, use error numbers in block 43000 - 43499 */
  NZERROR_PKCS11_LIBRARY_NOT_FOUND = 43000, /* PKCS #11 library not found */
  NZERROR_PKCS11_TOKEN_NOT_FOUND = 43001,
                                         /* can't find token with given label*/
  NZERROR_PKCS11_BAD_PASSPHRASE = 43002,  /* passphrase is incorrect/expired */
  NZERROR_PKCS11_GET_FUNC_LIST = 43003,  /* C_GetFunctionList returned error */
  NZERROR_PKCS11_INITIALIZE = 43004,     /* C_Initialize returned error */
  NZERROR_PKCS11_NO_TOKENS_PRESENT = 43005, /* No tokens present */
  NZERROR_PKCS11_GET_SLOT_LIST = 43006,  /* C_GetSlotList returned error */

  NZERROR_PKCS11_GET_TOKEN_INFO = 43008,  /* C_GetTokenInfo returned error */
  NZERROR_PKCS11_SYMBOL_NOT_FOUND = 43009, /* Symbol not found in PKCS11 lib */

  NZERROR_PKCS11_TOKEN_LOGIN_FAILED = 43011, /* Token login failed */

  NZERROR_PKCS11_CHANGE_PROVIDERS_ERROR = 43013, /* Change providers error */
  NZERROR_PKCS11_GET_PRIVATE_KEY_ERROR = 43014,
                              /* Error trying to find private key on token */
  NZERROR_PKCS11_CREATE_KEYPAIR_ERROR = 43015, /* Key pair gen error */
  NZERROR_PKCS11_WALLET_CONTAINS_P11_INFO = 43016, /* Wallet already contains
                                                      pkcs11 info */
  NZERROR_PKCS11_NO_CERT_ON_TOKEN = 43017,      /* No cert found on token */
  NZERROR_PKCS11_NO_USER_CERT_ON_TOKEN = 43018, /*No user cert found on token*/
  NZERROR_PKCS11_NO_CERT_ON_TOKEN_WITH_GIVEN_LABEL = 43019, /*No cert found on token with given certificate label.*/
  NZERROR_PKCS11_MULTIPLE_CERTS_ON_TOKEN_WITH_GIVEN_LABEL = 43020, /*Multiple certs found on token with given certificate label.*/
  NZERROR_PKCS11_CERT_WITH_LABEL_NOT_USER_CERT  = 43021, /*Cert with given cert is not a user cert because no corresponding pvt key found on token */

  /* RSA ERRORS 43050 - 43059 */
  NZERROR_BIND_SERVICE_ERROR = 43050,    /* C_BindService returned error */
  NZERROR_CREATE_KEY_OBJ_ERROR = 43051,  /* B_CreateKeyObject returned error */
  NZERROR_GET_CERT_FIELDS = 43052,       /* C_GetCertFields returned error */
  NZERROR_CREATE_PKCS10_OBJECT = 43053,
                                      /* C_CreatePKCS10Object returned error */
  NZERROR_SET_PKCS10_FIELDS = 43054,     /* C_SetPKCS10Fields returned error */
  NZERROR_SIGN_CERT_REQUEST = 43055,     /* C_SignCertRequest returned error */
  NZERROR_GET_PKCS10_DER = 43056,        /* C_GetPKCS10DER returned error */
  NZERROR_INITIALIZE_CERTC = 43057,      /* C_InitializeCertC returned error */
  NZERROR_INSERT_PRIVATE_KEY = 43058,   /* C_InsertPrivateKey returned error */
  NZERROR_RSA_ERROR = 43059,            /* RSA error. See trace output */

  /* slts ERRORS 43060 - 43069 */
  NZERROR_SLTSCTX_INIT_FAILED = 43060,    /* sltsini() returned error */
  NZERROR_SLTSKYC_FAILED = 43061,         /* sltskyc() returned error */
  NZERROR_SLTSCTX_TERM_FAILED = 43062,    /* sltster() returned error */
  NZERROR_SLTSKYS_FAILED = 43063,         /* sltskys() returned error */

  NZERROR_INVALID_HEADER_LENGTH = 43070,       /* bad sso header length */
  NZERROR_WALLET_CONTAINS_USER_CREDENTIALS = 43071, /* wallet not empty */
  NZERROR_CANNOT_MODIFY_AL = 43072,       /* Cannot modify AL wallet */
  NZERROR_FILE_LOCK_FAILED = 43073,       /* Cannot lock wallet file */

  /* Certificate selection errors 43080 - 43099 */
  NZERROR_MULTIPLE_MATCHING_CREDENTIALS = 43080, /* Multiple matching certs */
  NZERROR_KEYPAIR_CHECK = 43081,          /* Error matching pub and pvt keys */

  NZERROR_CSF_ALIAS_INVALID = 43100,      /* alias is invalid */
  NZERROR_CSF_KEY_INVALID = 43101,        /* key invalid */
  NZERROR_CSF_CRED_NOT_SUPPORTED = 43102, /* only pwd cred supported */
  NZERROR_CSF_HOSTNAME = 43103,           /* hostname error */
  NZERROR_CSF_XML = 43104,                /* XmlCreate error. See trace */
  NZERROR_CSF_WALLET_NOT_SPECIFIED = 43105,  /* no wallet specified */
  NZERROR_CSF_MAP_NOT_IN_STORE = 43106,   /* map does not exist in store */
  NZERROR_CSF_KEY_NOT_IN_STORE = 43107,   /* key does not exist in store */
  NZERROR_CSF_ENTRY_EXISTS = 43108,       /* entry with map/key exists */
  NZERROR_CSF_BTSTRP_WLT_PATH_NOT_SET = 43109, /* bootWallet Path not set */
  NZERROR_CSF_BTSTRP_WLT_MAP_NOT_SET = 43110,  /* bootWallet map (alias) not set */
  NZERROR_CSF_BTSTRP_WLT_KEY_NOT_SET = 43111,  /* bootWallet key not set */
  NZERROR_CSF_LDAP_USERNAME_NOT_SET = 43112,   /* ldap username not set */
  NZERROR_CSF_LDAP_PWD_NOT_SET = 43113,        /* ldap password not set */
  NZERROR_CSF_LDAP_URL_NOT_SET = 43114,        /* ldap url not set */
  NZERROR_CSF_LDAP_PORT_NOT_SET = 43115,       /* ldap port not set */
  NZERROR_CSF_LDAP_FARMNAME_NOT_SET = 43116,   /* ldap farmname not set */
  NZERROR_CSF_LDAP_ROOTNAME_NOT_SET = 43117,   /* ldap rootname not set */

  NZERROR_SSL_UNSUPPORTED_CIPHER = 43120,
  NZERROR_SSL_BAD_ENCRYPTED_VAUE = 43121,
  NZERROR_SSL_ERR_SIGNATURE = 43122,
  NZERROR_SSL_HARDWARE_FAILURE = 43123,
  NZERROR_SSL_ERR_PKEY = 43124,
  NZERROR_SSL_HANDSHAKE_FAILED = 43125,

  NZERROR_UNKNOWN_ECC_CURVE = 43130,

  NZERROR_ODBC_SQL_FAILED = 43131,           /* C CSF ODBC Callback error code      */
  NZERROR_CSF_DB_B64_DECODE_FAILED = 43132,     /* C CSF DB - zt base 64 decode failed */
  NZERROR_CSF_DB_DEC_SPLIT_FAILED = 43133,   /* Split during decryption is failed   */
  NZERROR_CSF_DB_DECKEY_NULL = 43134,        /* Master key is not present in bootwallet   */
  NZERROR_CSF_MAP_NOT_PRESENT = 43135,        /* Map is not present in credstore */
  NZERROR_CSF_KEY_NOT_PRESENT = 43136,        /* Key is not present in credstore */

  NZERROR_LX_ERROR = 43490,                /* lx api returned error */

  NZERROR_LAST_ERROR = 43499,                        /* Last available error */
                                            /* MAXIMUM ERROR NUMBER IS 43499 */

  /*
   * DO NOT JUST INSERT NEW ERRORS IN ANY OLD PLACE.  New errors should be
   * added such the current error retains their integer values. Duplicate
   * values will cause compiler errors.
   */
  NZERROR_THIS_MUST_BE_LAST

} nzerror;

/*
 * Macro to convert SSL errors to Oracle errors. As SSL errors are negative
 * and Oracle numbers are positive, the following needs to be done.
 * 1. The base error number, which is the highest, is added to the
 *    SSL error to get the index into the number range.
 * 2. The result is added to the base Oracle number to get the Oracle error.
 */
#define NZERROR_SSL_TO_ORACLE(ssl_error_) \
  ((ssl_error_ == SSLNoErr) \
   ? NZERROR_OK \
   : (nzerror) ((ssl_error_ - SSLMemoryErr) + (uword) NZERROR_SSLMemoryErr))
#endif /* NZERROR_ORACLE */


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/orgpolicy/v2/constraint.proto

namespace Google\Cloud\OrgPolicy\V2;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A `constraint` describes a way to restrict resource's configuration. For
 * example, you could enforce a constraint that controls which cloud services
 * can be activated across an organization, or whether a Compute Engine instance
 * can have serial port connections established. `Constraints` can be configured
 * by the organization's policy adminstrator to fit the needs of the organzation
 * by setting a `policy` that includes `constraints` at different locations in
 * the organization's resource hierarchy. Policies are inherited down the
 * resource hierarchy from higher levels, but can also be overridden. For
 * details about the inheritance rules please read about
 * [`policies`][google.cloud.OrgPolicy.v2.Policy].
 * `Constraints` have a default behavior determined by the `constraint_default`
 * field, which is the enforcement behavior that is used in the absence of a
 * `policy` being defined or inherited for the resource in question.
 *
 * Generated from protobuf message google.cloud.orgpolicy.v2.Constraint
 */
class Constraint extends \Google\Protobuf\Internal\Message
{
    /**
     * Immutable. The resource name of the Constraint. Must be in one of
     * the following forms:
     * * `projects/{project_number}/constraints/{constraint_name}`
     * * `folders/{folder_id}/constraints/{constraint_name}`
     * * `organizations/{organization_id}/constraints/{constraint_name}`
     * For example, "/projects/123/constraints/compute.disableSerialPortAccess".
     *
     * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     */
    private $name = '';
    /**
     * The human readable name.
     * Mutable.
     *
     * Generated from protobuf field string display_name = 2;
     */
    private $display_name = '';
    /**
     * Detailed description of what this `Constraint` controls as well as how and
     * where it is enforced.
     * Mutable.
     *
     * Generated from protobuf field string description = 3;
     */
    private $description = '';
    /**
     * The evaluation behavior of this constraint in the absence of 'Policy'.
     *
     * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ConstraintDefault constraint_default = 4;
     */
    private $constraint_default = 0;
    protected $constraint_type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Immutable. The resource name of the Constraint. Must be in one of
     *           the following forms:
     *           * `projects/{project_number}/constraints/{constraint_name}`
     *           * `folders/{folder_id}/constraints/{constraint_name}`
     *           * `organizations/{organization_id}/constraints/{constraint_name}`
     *           For example, "/projects/123/constraints/compute.disableSerialPortAccess".
     *     @type string $display_name
     *           The human readable name.
     *           Mutable.
     *     @type string $description
     *           Detailed description of what this `Constraint` controls as well as how and
     *           where it is enforced.
     *           Mutable.
     *     @type int $constraint_default
     *           The evaluation behavior of this constraint in the absence of 'Policy'.
     *     @type \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint $list_constraint
     *           Defines this constraint as being a ListConstraint.
     *     @type \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint $boolean_constraint
     *           Defines this constraint as being a BooleanConstraint.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Orgpolicy\V2\Constraint::initOnce();
        parent::__construct($data);
    }

    /**
     * Immutable. The resource name of the Constraint. Must be in one of
     * the following forms:
     * * `projects/{project_number}/constraints/{constraint_name}`
     * * `folders/{folder_id}/constraints/{constraint_name}`
     * * `organizations/{organization_id}/constraints/{constraint_name}`
     * For example, "/projects/123/constraints/compute.disableSerialPortAccess".
     *
     * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Immutable. The resource name of the Constraint. Must be in one of
     * the following forms:
     * * `projects/{project_number}/constraints/{constraint_name}`
     * * `folders/{folder_id}/constraints/{constraint_name}`
     * * `organizations/{organization_id}/constraints/{constraint_name}`
     * For example, "/projects/123/constraints/compute.disableSerialPortAccess".
     *
     * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The human readable name.
     * Mutable.
     *
     * Generated from protobuf field string display_name = 2;
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * The human readable name.
     * Mutable.
     *
     * Generated from protobuf field string display_name = 2;
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Detailed description of what this `Constraint` controls as well as how and
     * where it is enforced.
     * Mutable.
     *
     * Generated from protobuf field string description = 3;
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Detailed description of what this `Constraint` controls as well as how and
     * where it is enforced.
     * Mutable.
     *
     * Generated from protobuf field string description = 3;
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * The evaluation behavior of this constraint in the absence of 'Policy'.
     *
     * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ConstraintDefault constraint_default = 4;
     * @return int
     */
    public function getConstraintDefault()
    {
        return $this->constraint_default;
    }

    /**
     * The evaluation behavior of this constraint in the absence of 'Policy'.
     *
     * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ConstraintDefault constraint_default = 4;
     * @param int $var
     * @return $this
     */
    public function setConstraintDefault($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\OrgPolicy\V2\Constraint\ConstraintDefault::class);
        $this->constraint_default = $var;

        return $this;
    }

    /**
     * Defines this constraint as being a ListConstraint.
     *
     * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ListConstraint list_constraint = 5;
     * @return \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint|null
     */
    public function getListConstraint()
    {
        return $this->readOneof(5);
    }

    public function hasListConstraint()
    {
        return $this->hasOneof(5);
    }

    /**
     * Defines this constraint as being a ListConstraint.
     *
     * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ListConstraint list_constraint = 5;
     * @param \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint $var
     * @return $this
     */
    public function setListConstraint($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Defines this constraint as being a BooleanConstraint.
     *
     * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.BooleanConstraint boolean_constraint = 6;
     * @return \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint|null
     */
    public function getBooleanConstraint()
    {
        return $this->readOneof(6);
    }

    public function hasBooleanConstraint()
    {
        return $this->hasOneof(6);
    }

    /**
     * Defines this constraint as being a BooleanConstraint.
     *
     * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.BooleanConstraint boolean_constraint = 6;
     * @param \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint $var
     * @return $this
     */
    public function setBooleanConstraint($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getConstraintType()
    {
        return $this->whichOneof("constraint_type");
    }

}


text:
#ifndef UIDIALOGS_HPP_
#define UIDIALOGS_HPP_

#include <gtk/gtk.h>
#include <string>
#include <vector>
#include "GlobalDefs.hpp"

using namespace std;

class UiDialogs
{
public:

	UiDialogs();
	~UiDialogs();

	void InfoBanner(GtkWindow* parent, const char* text);
	void InfoDialog(GtkWindow* parent, const char* text);
	void WarningDialog(GtkWindow* parent, const char* text);
	void ErrorDialog(GtkWindow* parent, const char* text);
	char* InputDialog(GtkWindow* parent, const char* title,
						const char* text, const char* value);
	gboolean ConfirmDialog(GtkWindow* parent, const char* text);
	void ListDialog(GtkWindow* parent, const char* title, vector<string>& strlist);
	void FlushUiEvents(void);

	static void ShowDialog(GtkWindow* parent,
								const char* text, GtkMessageType type);
	static GtkDialog* BaseDialog(GtkWindow* parent, const char* title, bool cancel);

};

#endif /*UIDIALOGS_HPP_*/