text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore;
using NBitcoin;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace BTCPayServer.Services
{
#nullable enable
    public record WalletObjectId(WalletId WalletId, string Type, string Id);
    public record ObjectTypeId(string Type, string Id);
    public class GetWalletObjectsQuery
    {
        public GetWalletObjectsQuery()
        {

        }
        public GetWalletObjectsQuery(WalletId? walletId) : this(walletId, null, null)
        {
        }
        public GetWalletObjectsQuery(WalletObjectId walletObjectId) : this(walletObjectId.WalletId, walletObjectId.Type, new[] { walletObjectId.Id })
        {

        }
        public GetWalletObjectsQuery(WalletId? walletId, string type) : this(walletId, type, null)
        {
        }
        public GetWalletObjectsQuery(WalletId? walletId, string? type, string[]? ids)
        {
            WalletId = walletId;
            Type = type;
            Ids = ids;
        }
        public GetWalletObjectsQuery(ObjectTypeId[]? typesIds)
        {
            TypesIds = typesIds;
        }

        public WalletId? WalletId { get; set; }
        // Either the user passes a list of Types/Ids
        public ObjectTypeId[]? TypesIds { get; set; }
        // Or the user passes one type, and a list of Ids
        public string? Type { get; set; }
        public string[]? Ids { get; set; }
        public bool IncludeNeighbours { get; set; } = true;
        public bool UseInefficientPath { get; set; }
    }

#nullable restore
    public class WalletRepository
    {
        private readonly ApplicationDbContextFactory _ContextFactory;

        public WalletRepository(ApplicationDbContextFactory contextFactory)
        {
            _ContextFactory = contextFactory ?? throw new ArgumentNullException(nameof(contextFactory));
        }
#nullable enable
        public async Task<WalletObjectData?> GetWalletObject(WalletObjectId walletObjectId, bool includeNeighbours = true)
        {
            var r = await GetWalletObjects(new(walletObjectId) { IncludeNeighbours = includeNeighbours });
            return r.Select(o => o.Value).FirstOrDefault();
        }
        public async Task<Dictionary<WalletObjectId, WalletObjectData>> GetWalletObjects(GetWalletObjectsQuery queryObject)
        {
            ArgumentNullException.ThrowIfNull(queryObject);
            if (queryObject.Ids != null && queryObject.Type is null)
                throw new ArgumentException("If \"Ids\" is not null, \"Type\" is mandatory");
            if (queryObject.Type is not null && queryObject.TypesIds is not null)
                throw new ArgumentException("If \"Type\" is not null, \"TypesIds\" should be null");

            using var ctx = _ContextFactory.CreateContext();

            // If we are using postgres, the `transactionIds.Contains(w.BId)` result in a long query like `ANY(@txId1, @txId2, @txId3, @txId4)`
            // Such request isn't well optimized by postgres, and create different requests clogging up
            // pg_stat_statements output, making it impossible to analyze the performance impact of this query.
            // On top of this, the entity version is doing 2 left join to satisfy the Include queries, resulting in n*m row returned for each transaction.
            // n being the number of children, m the number of parents.
            if (ctx.Database.IsNpgsql() && !queryObject.UseInefficientPath)
            {
                var connection = ctx.Database.GetDbConnection();
                if (connection.State != System.Data.ConnectionState.Open)
                    await connection.OpenAsync();

                string walletIdFilter = queryObject.WalletId is not null ? " AND wos.\"WalletId\"=@walletId" : "";
                string typeFilter = queryObject.Type is not null ? " AND wos.\"Type\"=@type" : "";
                var cmd = connection.CreateCommand();
                var selectWalletObjects =
                    queryObject.TypesIds is not null ?
                    $"SELECT wos.* FROM unnest(@ids, @types) t(i,t) JOIN \"WalletObjects\" wos ON true{walletIdFilter} AND wos.\"Type\"=t AND wos.\"Id\"=i" :
                    queryObject.Ids is null ?
                    $"SELECT wos.* FROM \"WalletObjects\" wos WHERE true{walletIdFilter}{typeFilter} " :
                    queryObject.Ids.Length == 1 ?
                    $"SELECT wos.* FROM \"WalletObjects\" wos WHERE true{walletIdFilter} AND wos.\"Type\"=@type AND wos.\"Id\"=@id" :
                    $"SELECT wos.* FROM unnest(@ids) t JOIN \"WalletObjects\" wos ON true{walletIdFilter} AND wos.\"Type\"=@type AND wos.\"Id\"=t";

                var includeNeighbourSelect = queryObject.IncludeNeighbours ? ", wos2.\"Data\" AS \"Data2\"" : "";
                var includeNeighbourJoin = queryObject.IncludeNeighbours ? "LEFT JOIN \"WalletObjects\" wos2 ON wos.\"WalletId\"=wos2.\"WalletId\" AND wol.\"Type2\"=wos2.\"Type\" AND wol.\"Id2\"=wos2.\"Id\"" : "";
                var query =
                    $"SELECT wos.\"WalletId\", wos.\"Id\", wos.\"Type\", wos.\"Data\", wol.\"LinkData\", wol.\"Type2\", wol.\"Id2\"{includeNeighbourSelect} FROM ({selectWalletObjects}) wos " +
                    $"LEFT JOIN LATERAL ( " +
                    "SELECT \"AType\" AS \"Type2\", \"AId\" AS \"Id2\", \"Data\" AS \"LinkData\" FROM \"WalletObjectLinks\" WHERE \"WalletId\"=wos.\"WalletId\" AND \"BType\"=wos.\"Type\" AND \"BId\"=wos.\"Id\" " +
                    "UNION " +
                    "SELECT \"BType\" AS \"Type2\", \"BId\" AS \"Id2\", \"Data\" AS \"LinkData\" FROM \"WalletObjectLinks\" WHERE \"WalletId\"=wos.\"WalletId\" AND \"AType\"=wos.\"Type\" AND \"AId\"=wos.\"Id\"" +
                    $" ) wol ON true " + includeNeighbourJoin;
                cmd.CommandText = query;
                if (queryObject.WalletId is not null)
                {
                    var walletIdParam = cmd.CreateParameter();
                    walletIdParam.ParameterName = "walletId";
                    walletIdParam.Value = queryObject.WalletId.ToString();
                    walletIdParam.DbType = System.Data.DbType.String;
                    cmd.Parameters.Add(walletIdParam);
                }

                if (queryObject.Type != null)
                {
                    var typeParam = cmd.CreateParameter();
                    typeParam.ParameterName = "type";
                    typeParam.Value = queryObject.Type;
                    typeParam.DbType = System.Data.DbType.String;
                    cmd.Parameters.Add(typeParam);
                }

                if (queryObject.TypesIds != null)
                {
                    var typesParam = cmd.CreateParameter();
                    typesParam.ParameterName = "types";
                    typesParam.Value = queryObject.TypesIds.Select(t => t.Type).ToList();
                    typesParam.DbType = System.Data.DbType.Object;
                    cmd.Parameters.Add(typesParam);
                    var idParam = cmd.CreateParameter();
                    idParam.ParameterName = "ids";
                    idParam.Value = queryObject.TypesIds.Select(t => t.Id).ToList();
                    idParam.DbType = System.Data.DbType.Object;
                    cmd.Parameters.Add(idParam);
                }

                if (queryObject.Ids != null)
                {
                    if (queryObject.Ids.Length == 1)
                    {
                        var txIdParam = cmd.CreateParameter();
                        txIdParam.ParameterName = "id";
                        txIdParam.Value = queryObject.Ids[0];
                        txIdParam.DbType = System.Data.DbType.String;
                        cmd.Parameters.Add(txIdParam);
                    }
                    else
                    {
                        var txIdsParam = cmd.CreateParameter();
                        txIdsParam.ParameterName = "ids";
                        txIdsParam.Value = queryObject.Ids.ToList();
                        txIdsParam.DbType = System.Data.DbType.Object;
                        cmd.Parameters.Add(txIdsParam);
                    }
                }
                await using var reader = await cmd.ExecuteReaderAsync();
                var wosById = new Dictionary<WalletObjectId, WalletObjectData>();
                while (await reader.ReadAsync())
                {
                    WalletObjectData wo = new WalletObjectData();
                    wo.WalletId = (string)reader["WalletId"];
                    wo.Type = (string)reader["Type"];
                    wo.Id = (string)reader["Id"];
                    var id = new WalletObjectId(WalletId.Parse(wo.WalletId), wo.Type, wo.Id);
                    wo.Data = reader["Data"] is DBNull ? null : (string)reader["Data"];
                    if (wosById.TryGetValue(id, out var wo2))
                        wo = wo2;
                    else
                    {
                        wosById.Add(id, wo);
                        wo.Bs = new List<WalletObjectLinkData>();
                    }
                    if (reader["Type2"] is not DBNull)
                    {
                        var l = new WalletObjectLinkData()
                        {
                            BType = (string)reader["Type2"],
                            BId = (string)reader["Id2"],
                            Data = reader["LinkData"] is DBNull ? null : (string)reader["LinkData"]
                        };
                        wo.Bs.Add(l);
                        l.B = new WalletObjectData()
                        {
                            Type = l.BType,
                            Id = l.BId,
                            Data = (!queryObject.IncludeNeighbours || reader["Data2"] is DBNull) ? null : (string)reader["Data2"]
                        };
                    }
                }
                return wosById;
            }
            else // Unefficient path
            {
                IQueryable<WalletObjectData> q;
                if (queryObject.TypesIds is not null)
                {
                    // Note this is problematic if the type contains '##', but I don't see how to do it properly with entity framework
                    var idTypes = queryObject.TypesIds.Select(o => $"{o.Type}##{o.Id}").ToArray();
                    q = ctx.WalletObjects
                        .Where(w => (queryObject.WalletId == null || w.WalletId == queryObject.WalletId.ToString()) && idTypes.Contains(w.Type + "##" + w.Id));
                }
                else
                {
                    q = ctx.WalletObjects
                        .Where(w => (queryObject.WalletId == null || w.WalletId == queryObject.WalletId.ToString()) && (queryObject.Type == null || w.Type == queryObject.Type) && (queryObject.Ids == null || queryObject.Ids.Contains(w.Id)));
                }
                if (queryObject.IncludeNeighbours)
                {
                    q = q.Include(o => o.Bs).ThenInclude(o => o.B)
                        .Include(o => o.As).ThenInclude(o => o.A);
                }
                q = q.AsNoTracking();

                var wosById = new Dictionary<WalletObjectId, WalletObjectData>();
                foreach (var row in await q.ToListAsync())
                {
                    var id = new WalletObjectId(WalletId.Parse(row.WalletId), row.Type, row.Id);
                    wosById.TryAdd(id, row);
                }
                return wosById;
            }
        }
#nullable restore
        public async Task<Dictionary<string, WalletTransactionInfo>> GetWalletTransactionsInfo(WalletId walletId, string[] transactionIds = null)
        {
            var wos = await GetWalletObjects((GetWalletObjectsQuery)(new(walletId, WalletObjectData.Types.Tx, transactionIds)));
            var result = new Dictionary<string, WalletTransactionInfo>(wos.Count);
            foreach (var obj in wos.Values)
            {
                var data = obj.Data is null ? null : JObject.Parse(obj.Data);
                var info = new WalletTransactionInfo(walletId)
                {
                    Comment = data?["comment"]?.Value<string>()
                };
                result.Add(obj.Id, info);
                foreach (var neighbour in obj.GetNeighbours())
                {
                    var neighbourData = neighbour.Data is null ? null : JObject.Parse(neighbour.Data);
                    if (neighbour.Type == WalletObjectData.Types.Label)
                    {
                        info.LabelColors.TryAdd(neighbour.Id, neighbourData?["color"]?.Value<string>() ?? "#000");
                    }
                    else
                    {
                        info.Attachments.Add(new Attachment(neighbour.Type, neighbour.Id, neighbourData));
                    }
                }
            }
            return result;
        }

#nullable enable

        public async Task<(string Label, string Color)[]> GetWalletLabels(WalletId walletId)
        {
            await using var ctx = _ContextFactory.CreateContext();
            return (await
                    ctx.WalletObjects.AsNoTracking().Where(w => w.WalletId == walletId.ToString() && w.Type == WalletObjectData.Types.Label)
                    .ToArrayAsync())
                    .Select(o => (o.Id, JObject.Parse(o.Data)["color"]!.Value<string>()!)).ToArray();
        }

        public async Task<bool> RemoveWalletObjects(WalletObjectId walletObjectId)
        {
            await using var ctx = _ContextFactory.CreateContext();
            var entity = new WalletObjectData()
            {
                WalletId = walletObjectId.WalletId.ToString(),
                Type = walletObjectId.Type,
                Id = walletObjectId.Id
            };
            ctx.WalletObjects.Add(entity);
            ctx.Entry(entity).State = EntityState.Deleted;
            try
            {
                await ctx.SaveChangesAsync();
                return true;
            }
            catch (DbUpdateException) // doesn't exists
            {
                return false;
            }
        }

        public async Task EnsureWalletObjectLink(WalletObjectId a, WalletObjectId b, JObject? data = null)
        {
            SortWalletObjectLinks(ref a, ref b);
            await using var ctx = _ContextFactory.CreateContext();
            var l = new WalletObjectLinkData()
            {
                WalletId = a.WalletId.ToString(),
                AType = a.Type,
                AId = a.Id,
                BType = b.Type,
                BId = b.Id,
                Data = data?.ToString(Formatting.None)
            };
            ctx.WalletObjectLinks.Add(l);
            try
            {
                await ctx.SaveChangesAsync();
            }
            catch (DbUpdateException) // already exists
            {
            }
        }

        class WalletObjectIdComparer : IComparer<WalletObjectId>
        {
            public static readonly WalletObjectIdComparer Instance = new WalletObjectIdComparer();
            public int Compare(WalletObjectId? x, WalletObjectId? y)
            {
                var c = StringComparer.InvariantCulture.Compare(x?.Type, y?.Type);
                if (c == 0)
                    c = StringComparer.InvariantCulture.Compare(x?.Id, y?.Id);
                return c;
            }
        }

        private void SortWalletObjectLinks(ref WalletObjectId a, ref WalletObjectId b)
        {
            if (a.WalletId != b.WalletId)
                throw new ArgumentException("It shouldn't be possible to set a link between different wallets");
            var ab = new[] { a, b };
            Array.Sort(ab, WalletObjectIdComparer.Instance);
            a = ab[0];
            b = ab[1];
        }
        public async Task SetWalletObjectLink(WalletObjectId a, WalletObjectId b, JObject? data = null)
        {
            SortWalletObjectLinks(ref a, ref b);

            await using var ctx = _ContextFactory.CreateContext();
            var l = new WalletObjectLinkData()
            {
                WalletId = a.WalletId.ToString(),
                AType = a.Type,
                AId = a.Id,
                BType = b.Type,
                BId = b.Id,
                Data = data?.ToString(Formatting.None)
            };
            var e = ctx.WalletObjectLinks.Add(l);
            try
            {
                await ctx.SaveChangesAsync();
            }
            catch (DbUpdateException) // already exists
            {
                e.State = EntityState.Modified;
                await ctx.SaveChangesAsync();
            }
        }

        public static int MaxCommentSize = 200;
        public async Task SetWalletObjectComment(WalletObjectId id, string comment)
        {
            ArgumentNullException.ThrowIfNull(id);
            ArgumentNullException.ThrowIfNull(comment);
            if (!string.IsNullOrEmpty(comment))
                await ModifyWalletObjectData(id, (o) => o["comment"] = comment.Trim().Truncate(MaxCommentSize));
            else
                await ModifyWalletObjectData(id, (o) => o.Remove("comment"));
        }

        static WalletObjectData NewWalletObjectData(WalletObjectId id, JObject? data = null)
        {
            return new WalletObjectData()
            {
                WalletId = id.WalletId.ToString(),
                Type = id.Type,
                Id = id.Id,
                Data = data?.ToString()
            };
        }
        public async Task ModifyWalletObjectData(WalletObjectId id, Action<JObject> modify)
        {
            ArgumentNullException.ThrowIfNull(id);
            ArgumentNullException.ThrowIfNull(modify);
            using var ctx = _ContextFactory.CreateContext();
            var obj = await ctx.WalletObjects.FindAsync(id.WalletId.ToString(), id.Type, id.Id);
            if (obj is null)
            {
                obj = NewWalletObjectData(id);
                ctx.WalletObjects.Add(obj);
            }
            var currentData = obj.Data is null ? new JObject() : JObject.Parse(obj.Data);
            modify(currentData);
            obj.Data = currentData.ToString();
            if (obj.Data == "{}")
                obj.Data = null;
            await ctx.SaveChangesAsync();
        }

        const int MaxLabelSize = 50;
        public async Task AddWalletObjectLabels(WalletObjectId id, params string[] labels)
        {
            ArgumentNullException.ThrowIfNull(id);
            await EnsureWalletObject(id);
            foreach (var l in labels.Select(l => l.Trim().Truncate(MaxLabelSize)))
            {
                var labelObjId = new WalletObjectId(id.WalletId, WalletObjectData.Types.Label, l);
                await EnsureWalletObject(labelObjId, new JObject()
                {
                    ["color"] = ColorPalette.Default.DeterministicColor(l)
                });
                await EnsureWalletObjectLink(labelObjId, id);
            }
        }
        public Task AddWalletTransactionAttachment(WalletId walletId, uint256 txId, Attachment attachment)
        {
            return AddWalletTransactionAttachment(walletId, txId, new[] { attachment });
        }
        public async Task AddWalletTransactionAttachment(WalletId walletId, uint256 txId, IEnumerable<Attachment> attachments)
        {
            ArgumentNullException.ThrowIfNull(walletId);
            ArgumentNullException.ThrowIfNull(txId);
            var txObjId = new WalletObjectId(walletId, WalletObjectData.Types.Tx, txId.ToString());
            await EnsureWalletObject(txObjId);
            foreach (var attachment in attachments)
            {
                var labelObjId = new WalletObjectId(walletId, WalletObjectData.Types.Label, attachment.Type);
                await EnsureWalletObject(labelObjId, new JObject()
                {
                    ["color"] = ColorPalette.Default.DeterministicColor(attachment.Type)
                });
                await EnsureWalletObjectLink(labelObjId, txObjId);
                if (attachment.Data is not null || attachment.Id.Length != 0)
                {
                    var data = new WalletObjectId(walletId, attachment.Type, attachment.Id);
                    await EnsureWalletObject(data, attachment.Data);
                    await EnsureWalletObjectLink(data, txObjId);
                }
            }
        }

        public async Task<bool> RemoveWalletObjectLink(WalletObjectId a, WalletObjectId b)
        {
            SortWalletObjectLinks(ref a, ref b);
            await using var ctx = _ContextFactory.CreateContext();
            ctx.WalletObjectLinks.Remove(new WalletObjectLinkData()
            {
                WalletId = a.WalletId.ToString(),
                AId = a.Id,
                AType = a.Type,
                BId = b.Id,
                BType = b.Type
            });
            try
            {
                await ctx.SaveChangesAsync();
                return true;
            }
            catch (DbUpdateException) // Already deleted, do nothing
            {
                return false;
            }
        }
        public async Task RemoveWalletObjectLabels(WalletObjectId id, params string[] labels)
        {
            ArgumentNullException.ThrowIfNull(id);
            foreach (var l in labels.Select(l => l.Trim()))
            {
                var labelObjId = new WalletObjectId(id.WalletId, WalletObjectData.Types.Label, l);
                await RemoveWalletObjectLink(labelObjId, id);
            }
        }

        public async Task SetWalletObject(WalletObjectId id, JObject? data)
        {
            ArgumentNullException.ThrowIfNull(id);
            await using var ctx = _ContextFactory.CreateContext();
            var o = NewWalletObjectData(id, data);
            ctx.WalletObjects.Add(o);
            try
            {
                await ctx.SaveChangesAsync();
            }
            catch (DbUpdateException) // already exists
            {
                ctx.Entry(o).State = EntityState.Modified;
                await ctx.SaveChangesAsync();
            }
        }

        public async Task EnsureWalletObject(WalletObjectId id, JObject? data = null)
        {
            ArgumentNullException.ThrowIfNull(id);
            await using var ctx = _ContextFactory.CreateContext();
            ctx.WalletObjects.Add(NewWalletObjectData(id, data));
            try
            {
                await ctx.SaveChangesAsync();
            }
            catch (DbUpdateException) // already exists
            {
            }
        }
#nullable restore
    }
}


text:
#ifndef __cocos2d_libs__CCTouchEventListener__
#define __cocos2d_libs__CCTouchEventListener__

#include "CCEventListener.h"
#include "event_dispatcher/CCTouch.h"

#include <vector>

NS_CC_BEGIN

class EventListenerTouch : public EventListener
{
public:
    static EventListenerTouch* create(Touch::DispatchMode mode);

    /// Overrides
    virtual EventListenerTouch* clone() override;
    virtual bool checkAvaiable() override;

    virtual ~EventListenerTouch();

private:
    EventListenerTouch();
    bool init(Touch::DispatchMode mode);

public:
    std::function<bool(Touch*, Event*)> onTouchBegan;
    std::function<void(Touch*, Event*)> onTouchMoved;
    std::function<void(Touch*, Event*)> onTouchEnded;
    std::function<void(Touch*, Event*)> onTouchCancelled;

    std::function<void(const std::vector<Touch*>&, Event*)> onTouchesBegan;
    std::function<void(const std::vector<Touch*>&, Event*)> onTouchesMoved;
    std::function<void(const std::vector<Touch*>&, Event*)> onTouchesEnded;
    std::function<void(const std::vector<Touch*>&, Event*)> onTouchesCancelled;

    void setSwallowTouches(bool needSwallow);

private:
    std::vector<Touch*> _claimedTouches;
    bool _needSwallow;
    Touch::DispatchMode _dispatchMode;

    friend class EventDispatcher;
};

NS_CC_END

#endif /* defined(__cocos2d_libs__CCTouchEventListener__) */

redpajama_set_name: RedPajamaGithub


text:
@interface TimeTableViewController : UITableViewController
{
  Settings*settings;
}

@end


text:
#include <vo-aacenc/voAAC.h>
#include <vo-aacenc/cmnMemory.h>

#include "avcodec.h"
#include "audio_frame_queue.h"
#include "internal.h"
#include "mpeg4audio.h"

#define FRAME_SIZE 1024
#define ENC_DELAY  1600

typedef struct AACContext {
    VO_AUDIO_CODECAPI codec_api;
    VO_HANDLE handle;
    VO_MEM_OPERATOR mem_operator;
    VO_CODEC_INIT_USERDATA user_data;
    VO_PBYTE end_buffer;
    AudioFrameQueue afq;
    int last_frame;
    int last_samples;
} AACContext;

static int aac_encode_close(AVCodecContext *avctx)
{
    AACContext *s = avctx->priv_data;

    s->codec_api.Uninit(s->handle);
#if FF_API_OLD_ENCODE_AUDIO
    av_freep(&avctx->coded_frame);
#endif
    av_freep(&avctx->extradata);
    ff_af_queue_close(&s->afq);
    av_freep(&s->end_buffer);

    return 0;
}

static av_cold int aac_encode_init(AVCodecContext *avctx)
{
    AACContext *s = avctx->priv_data;
    AACENC_PARAM params = { 0 };
    int index, ret;

#if FF_API_OLD_ENCODE_AUDIO
    avctx->coded_frame = avcodec_alloc_frame();
    if (!avctx->coded_frame)
        return AVERROR(ENOMEM);
#endif
    avctx->frame_size = FRAME_SIZE;
    avctx->delay      = ENC_DELAY;
    s->last_frame     = 2;
    ff_af_queue_init(avctx, &s->afq);

    s->end_buffer = av_mallocz(avctx->frame_size * avctx->channels * 2);
    if (!s->end_buffer) {
        ret = AVERROR(ENOMEM);
        goto error;
    }

    voGetAACEncAPI(&s->codec_api);

    s->mem_operator.Alloc = cmnMemAlloc;
    s->mem_operator.Copy = cmnMemCopy;
    s->mem_operator.Free = cmnMemFree;
    s->mem_operator.Set = cmnMemSet;
    s->mem_operator.Check = cmnMemCheck;
    s->user_data.memflag = VO_IMF_USERMEMOPERATOR;
    s->user_data.memData = &s->mem_operator;
    s->codec_api.Init(&s->handle, VO_AUDIO_CodingAAC, &s->user_data);

    params.sampleRate = avctx->sample_rate;
    params.bitRate    = avctx->bit_rate;
    params.nChannels  = avctx->channels;
    params.adtsUsed   = !(avctx->flags & CODEC_FLAG_GLOBAL_HEADER);
    if (s->codec_api.SetParam(s->handle, VO_PID_AAC_ENCPARAM, &params)
        != VO_ERR_NONE) {
        av_log(avctx, AV_LOG_ERROR, "Unable to set encoding parameters\n");
        ret = AVERROR(EINVAL);
        goto error;
    }

    for (index = 0; index < 16; index++)
        if (avctx->sample_rate == avpriv_mpeg4audio_sample_rates[index])
            break;
    if (index == 16) {
        av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n",
                                    avctx->sample_rate);
        ret = AVERROR(ENOSYS);
        goto error;
    }
    if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
        avctx->extradata_size = 2;
        avctx->extradata      = av_mallocz(avctx->extradata_size +
                                           FF_INPUT_BUFFER_PADDING_SIZE);
        if (!avctx->extradata) {
            ret = AVERROR(ENOMEM);
            goto error;
        }

        avctx->extradata[0] = 0x02 << 3 | index >> 1;
        avctx->extradata[1] = (index & 0x01) << 7 | avctx->channels << 3;
    }
    return 0;
error:
    aac_encode_close(avctx);
    return ret;
}

static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
                            const AVFrame *frame, int *got_packet_ptr)
{
    AACContext *s = avctx->priv_data;
    VO_CODECBUFFER input = { 0 }, output = { 0 };
    VO_AUDIO_OUTPUTINFO output_info = { { 0 } };
    VO_PBYTE samples;
    int ret;

    /* handle end-of-stream small frame and flushing */
    if (!frame) {
        if (s->last_frame <= 0)
            return 0;
        if (s->last_samples > 0 && s->last_samples < ENC_DELAY - FRAME_SIZE) {
            s->last_samples = 0;
            s->last_frame--;
        }
        s->last_frame--;
        memset(s->end_buffer, 0, 2 * avctx->channels * avctx->frame_size);
        samples = s->end_buffer;
    } else {
        if (frame->nb_samples < avctx->frame_size) {
            s->last_samples = frame->nb_samples;
            memcpy(s->end_buffer, frame->data[0], 2 * avctx->channels * frame->nb_samples);
            samples = s->end_buffer;
        } else {
            samples = (VO_PBYTE)frame->data[0];
        }
        /* add current frame to the queue */
        if ((ret = ff_af_queue_add(&s->afq, frame) < 0))
            return ret;
    }

    if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 * avctx->channels))))
        return ret;

    input.Buffer  = samples;
    input.Length  = 2 * avctx->channels * avctx->frame_size;
    output.Buffer = avpkt->data;
    output.Length = avpkt->size;

    s->codec_api.SetInputData(s->handle, &input);
    if (s->codec_api.GetOutputData(s->handle, &output, &output_info)
        != VO_ERR_NONE) {
        av_log(avctx, AV_LOG_ERROR, "Unable to encode frame\n");
        return AVERROR(EINVAL);
    }

    /* Get the next frame pts/duration */
    ff_af_queue_remove(&s->afq, avctx->frame_size, &avpkt->pts,
                       &avpkt->duration);

    avpkt->size = output.Length;
    *got_packet_ptr = 1;
    return 0;
}

AVCodec ff_libvo_aacenc_encoder = {
    .name           = "libvo_aacenc",
    .type           = AVMEDIA_TYPE_AUDIO,
    .id             = AV_CODEC_ID_AAC,
    .priv_data_size = sizeof(AACContext),
    .init           = aac_encode_init,
    .encode2        = aac_encode_frame,
    .close          = aac_encode_close,
    .supported_samplerates = avpriv_mpeg4audio_sample_rates,
    .capabilities   = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY,
    .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                     AV_SAMPLE_FMT_NONE },
    .long_name      = NULL_IF_CONFIG_SMALL("Android VisualOn AAC (Advanced Audio Coding)"),
};


text:
default['sysctl']['params']['fs']['file-max'] = 100000

# Discourage swapping
default['sysctl']['params']['vm']['swappiness'] = 10

# Increase ephermeral IP ports
default['sysctl']['params']['net']['ipv4']['ip_local_port_range'] = '10000 65500'

# Increase autotuning TCP buffer limits for 1G NIC
default['sysctl']['params']['net']['core']['rmem_max'] = 16777216
default['sysctl']['params']['net']['core']['wmem_max'] = 16777216
default['sysctl']['params']['net']['core']['rmem_default'] = 16777216
default['sysctl']['params']['net']['core']['wmem_default'] = 16777216
default['sysctl']['params']['net']['core']['optmem_max'] = 40960
default['sysctl']['params']['net']['core']['netdev_max_backlog'] = 50000
default['sysctl']['params']['net']['ipv4']['tcp_rmem'] = '4096 87380 16777216'
default['sysctl']['params']['net']['ipv4']['tcp_wmem'] = '4096 87380 16777216'
default['sysctl']['params']['net']['ipv4']['tcp_max_syn_backlog'] = 30000
default['sysctl']['params']['net']['ipv4']['tcp_max_tw_buckets'] = 2000000

default['sysctl']['params']['net']['ipv4']['tcp_mtu_probing'] = 1
default['sysctl']['params']['net']['ipv4']['tcp_fin_timeout'] = 10

default['sysctl']['params']['net']['ipv4']['tcp_rfc1337'] = 1
default['sysctl']['params']['net']['ipv4']['tcp_tw_reuse'] = 1
default['sysctl']['params']['net']['ipv4']['tcp_slow_start_after_idle'] = 0

default['sysctl']['params']['net']['ipv4']['tcp_syncookies'] = 1

# Set UDP buffer limits
default['sysctl']['params']['net']['ipv4']['udp_rmem_min'] = 8192
default['sysctl']['params']['net']['ipv4']['udp_wmem_min'] = 8192

# Disable redirects and source routes
default['sysctl']['params']['net']['ipv4']['conf']['default']['send_redirects'] = 0
default['sysctl']['params']['net']['ipv4']['conf']['all']['send_redirects'] = 0
default['sysctl']['params']['net']['ipv4']['conf']['default']['accept_redirects'] = 0
default['sysctl']['params']['net']['ipv4']['conf']['all']['accept_redirects'] = 0
default['sysctl']['params']['net']['ipv4']['conf']['all']['secure_redirects'] = 0
default['sysctl']['params']['net']['ipv4']['conf']['all']['accept_source_route'] = 0

default['sysctl']['params']['net']['ipv4']['conf']['all']['log_martians'] = 1


text:
function [globalYHOG] = prepHOG(veri)

%%%%%%%% GAUSSIAN SMOOTHING TO Y COMPONENT %%%%%%%%

         h = fspecial('gaussian',[3 3]);
         yf = imfilter(veri,h);

%%%%%%%% Y COMPONENT NORMALIZATION %%%%%%%%

         mindata = double(min(min(yf)));
         maxdata = double(max(max(yf)));
         normalised = double((double(veri)-mindata)/double((maxdata)-mindata));

         globalYHOG = normalised;

end


text:
title: Bram Geurts
slug: bram-geurts
category: authors
date: 2017-08-10
Template: staff_page
route: 767
room_nr:
phone_nr: +31 24 3619675
email: bram.geurts@radboudumc.nl
google_scholar_code:
researcher_id:
linkedin_url:
website_lit_search_name:
group_member: ,,,,,,


text:
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import AddIcon from '@material-ui/icons/Add';
import Button from 'material-ui/Button';
import DeleteIcon from '@material-ui/icons/Delete';
import IconButton from 'material-ui/IconButton';
import Tooltip from 'material-ui/Tooltip';

const styles = theme => ({
  fab: {
    margin: theme.spacing.unit * 2,
  },
  absolute: {
    position: 'absolute',
    bottom: theme.spacing.unit * 2,
    right: theme.spacing.unit * 3,
  },
});

function SimpleTooltips(props) {
  const { classes } = props;
  return (

      <Tooltip id="tooltip-icon" title="Delete">
        <IconButton aria-label="Delete">
          <DeleteIcon />
        </IconButton>
      </Tooltip>
      <Tooltip id="tooltip-fab" title="Add">
        <Button variant="fab" color="primary" aria-label="Add" className={classes.fab}>
          <AddIcon />
        </Button>
      </Tooltip>

      <Tooltip title="FAB 'position: absolute;'">
        <Button variant="fab" color="secondary" className={props.classes.absolute}>
          <AddIcon />
        </Button>
      </Tooltip>

  );
}

SimpleTooltips.propTypes = {
  classes: PropTypes.object.isRequired,
};

export default withStyles(styles)(SimpleTooltips);


text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Events.Protobuf.Cloud.Storage.V1 {

  /// Holder for reflection information generated from google/events/cloud/storage/v1/data.proto
  public static partial class DataReflection {

    #region Descriptor
    /// File descriptor for google/events/cloud/storage/v1/data.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static DataReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Cilnb29nbGUvZXZlbnRzL2Nsb3VkL3N0b3JhZ2UvdjEvZGF0YS5wcm90bxIe",
            "Z29vZ2xlLmV2ZW50cy5jbG91ZC5zdG9yYWdlLnYxGh9nb29nbGUvcHJvdG9i",
            "dWYvdGltZXN0YW1wLnByb3RvIpEIChFTdG9yYWdlT2JqZWN0RGF0YRIYChBj",
            "b250ZW50X2VuY29kaW5nGAEgASgJEhsKE2NvbnRlbnRfZGlzcG9zaXRpb24Y",
            "AiABKAkSFQoNY2FjaGVfY29udHJvbBgDIAEoCRIYChBjb250ZW50X2xhbmd1",
            "YWdlGAUgASgJEhYKDm1ldGFnZW5lcmF0aW9uGAYgASgDEjAKDHRpbWVfZGVs",
            "ZXRlZBgHIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASFAoMY29u",
            "dGVudF90eXBlGAggASgJEgwKBHNpemUYCSABKAMSMAoMdGltZV9jcmVhdGVk",
            "GAogASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIOCgZjcmMzMmMY",
            "CyABKAkSFwoPY29tcG9uZW50X2NvdW50GAwgASgFEhAKCG1kNV9oYXNoGA0g",
            "ASgJEgwKBGV0YWcYDiABKAkSKwoHdXBkYXRlZBgPIAEoCzIaLmdvb2dsZS5w",
            "cm90b2J1Zi5UaW1lc3RhbXASFQoNc3RvcmFnZV9jbGFzcxgQIAEoCRIUCgxr",
            "bXNfa2V5X25hbWUYESABKAkSPgoadGltZV9zdG9yYWdlX2NsYXNzX3VwZGF0",
            "ZWQYEiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhYKDnRlbXBv",
            "cmFyeV9ob2xkGBMgASgIEj0KGXJldGVudGlvbl9leHBpcmF0aW9uX3RpbWUY",
            "FCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wElEKCG1ldGFkYXRh",
            "GBUgAygLMj8uZ29vZ2xlLmV2ZW50cy5jbG91ZC5zdG9yYWdlLnYxLlN0b3Jh",
            "Z2VPYmplY3REYXRhLk1ldGFkYXRhRW50cnkSGAoQZXZlbnRfYmFzZWRfaG9s",
            "ZBgdIAEoCBIMCgRuYW1lGBcgASgJEgoKAmlkGBggASgJEg4KBmJ1Y2tldBgZ",
            "IAEoCRISCgpnZW5lcmF0aW9uGBogASgDEmEKE2N1c3RvbWVyX2VuY3J5cHRp",
            "b24YHCABKAsyRC5nb29nbGUuZXZlbnRzLmNsb3VkLnN0b3JhZ2UudjEuU3Rv",
            "cmFnZU9iamVjdERhdGEuQ3VzdG9tZXJFbmNyeXB0aW9uEhIKCm1lZGlhX2xp",
            "bmsYZCABKAkSEQoJc2VsZl9saW5rGGUgASgJEgwKBGtpbmQYZiABKAkaRgoS",
            "Q3VzdG9tZXJFbmNyeXB0aW9uEhwKFGVuY3J5cHRpb25fYWxnb3JpdGhtGAEg",
            "ASgJEhIKCmtleV9zaGEyNTYYAiABKAkaLwoNTWV0YWRhdGFFbnRyeRILCgNr",
            "ZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBQiqqAidHb29nbGUuRXZlbnRz",
            "LlByb3RvYnVmLkNsb3VkLlN0b3JhZ2UuVjFiBnByb3RvMw=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Events.Protobuf.Cloud.Storage.V1.StorageObjectData), global::Google.Events.Protobuf.Cloud.Storage.V1.StorageObjectData.Parser, new[]{ "ContentEncoding", "ContentDisposition", "CacheControl", "ContentLanguage", "Metageneration", "TimeDeleted", "ContentType", "Size", "TimeCreated", "Crc32C", "ComponentCount", "Md5Hash", "Etag", "Updated", "StorageClass", "KmsKeyName", "TimeStorageClassUpdated", "TemporaryHold", "RetentionExpirationTime", "Metadata", "EventBasedHold", "Name", "Id", "Bucket", "Generation", "CustomerEncryption", "MediaLink", "SelfLink", "Kind" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Events.Protobuf.Cloud.Storage.V1.StorageObjectData.Types.CustomerEncryption), global::Google.Events.Protobuf.Cloud.Storage.V1.StorageObjectData.Types.CustomerEncryption.Parser, new[]{ "EncryptionAlgorithm", "KeySha256" }, null, null, null, null),
            null, })
          }));
    }
    #endregion

  }
  #region Messages
  ///
  /// An object within Google Cloud Storage.
  ///
  public sealed partial class StorageObjectData : pb::IMessage<StorageObjectData>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<StorageObjectData> _parser = new pb::MessageParser<StorageObjectData>(() => new StorageObjectData());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<StorageObjectData> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Events.Protobuf.Cloud.Storage.V1.DataReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public StorageObjectData() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public StorageObjectData(StorageObjectData other) : this() {
      contentEncoding_ = other.contentEncoding_;
      contentDisposition_ = other.contentDisposition_;
      cacheControl_ = other.cacheControl_;
      contentLanguage_ = other.contentLanguage_;
      metageneration_ = other.metageneration_;
      timeDeleted_ = other.timeDeleted_ != null ? other.timeDeleted_.Clone() : null;
      contentType_ = other.contentType_;
      size_ = other.size_;
      timeCreated_ = other.timeCreated_ != null ? other.timeCreated_.Clone() : null;
      crc32C_ = other.crc32C_;
      componentCount_ = other.componentCount_;
      md5Hash_ = other.md5Hash_;
      etag_ = other.etag_;
      updated_ = other.updated_ != null ? other.updated_.Clone() : null;
      storageClass_ = other.storageClass_;
      kmsKeyName_ = other.kmsKeyName_;
      timeStorageClassUpdated_ = other.timeStorageClassUpdated_ != null ? other.timeStorageClassUpdated_.Clone() : null;
      temporaryHold_ = other.temporaryHold_;
      retentionExpirationTime_ = other.retentionExpirationTime_ != null ? other.retentionExpirationTime_.Clone() : null;
      metadata_ = other.metadata_.Clone();
      eventBasedHold_ = other.eventBasedHold_;
      name_ = other.name_;
      id_ = other.id_;
      bucket_ = other.bucket_;
      generation_ = other.generation_;
      customerEncryption_ = other.customerEncryption_ != null ? other.customerEncryption_.Clone() : null;
      mediaLink_ = other.mediaLink_;
      selfLink_ = other.selfLink_;
      kind_ = other.kind_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public StorageObjectData Clone() {
      return new StorageObjectData(this);
    }

    /// Field number for the "content_encoding" field.
    public const int ContentEncodingFieldNumber = 1;
    private string contentEncoding_ = "";
    ///
    /// Content-Encoding of the object data, matching
    /// [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string ContentEncoding {
      get { return contentEncoding_; }
      set {
        contentEncoding_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "content_disposition" field.
    public const int ContentDispositionFieldNumber = 2;
    private string contentDisposition_ = "";
    ///
    /// Content-Disposition of the object data, matching
    /// [https://tools.ietf.org/html/rfc6266][RFC 6266].
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string ContentDisposition {
      get { return contentDisposition_; }
      set {
        contentDisposition_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "cache_control" field.
    public const int CacheControlFieldNumber = 3;
    private string cacheControl_ = "";
    ///
    /// Cache-Control directive for the object data, matching
    /// [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string CacheControl {
      get { return cacheControl_; }
      set {
        cacheControl_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "content_language" field.
    public const int ContentLanguageFieldNumber = 5;
    private string contentLanguage_ = "";
    ///
    /// Content-Language of the object data, matching
    /// [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string ContentLanguage {
      get { return contentLanguage_; }
      set {
        contentLanguage_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "metageneration" field.
    public const int MetagenerationFieldNumber = 6;
    private long metageneration_;
    ///
    /// The version of the metadata for this object at this generation. Used for
    /// preconditions and for detecting changes in metadata. A metageneration
    /// number is only meaningful in the context of a particular generation of a
    /// particular object.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public long Metageneration {
      get { return metageneration_; }
      set {
        metageneration_ = value;
      }
    }

    /// Field number for the "time_deleted" field.
    public const int TimeDeletedFieldNumber = 7;
    private global::Google.Protobuf.WellKnownTypes.Timestamp timeDeleted_;
    ///
    /// The deletion time of the object. Will be returned if and only if this
    /// version of the object has been deleted.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp TimeDeleted {
      get { return timeDeleted_; }
      set {
        timeDeleted_ = value;
      }
    }

    /// Field number for the "content_type" field.
    public const int ContentTypeFieldNumber = 8;
    private string contentType_ = "";
    ///
    /// Content-Type of the object data, matching
    /// [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
    /// If an object is stored without a Content-Type, it is served as
    /// `application/octet-stream`.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string ContentType {
      get { return contentType_; }
      set {
        contentType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "size" field.
    public const int SizeFieldNumber = 9;
    private long size_;
    ///
    /// Content-Length of the object data in bytes, matching
    /// [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public long Size {
      get { return size_; }
      set {
        size_ = value;
      }
    }

    /// Field number for the "time_created" field.
    public const int TimeCreatedFieldNumber = 10;
    private global::Google.Protobuf.WellKnownTypes.Timestamp timeCreated_;
    ///
    /// The creation time of the object.
    /// Attempting to set this field will result in an error.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp TimeCreated {
      get { return timeCreated_; }
      set {
        timeCreated_ = value;
      }
    }

    /// Field number for the "crc32c" field.
    public const int Crc32CFieldNumber = 11;
    private string crc32C_ = "";
    ///
    /// CRC32c checksum. For more information about using the CRC32c
    /// checksum, see
    /// [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
    /// ETags: Best Practices].
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Crc32C {
      get { return crc32C_; }
      set {
        crc32C_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "component_count" field.
    public const int ComponentCountFieldNumber = 12;
    private int componentCount_;
    ///
    /// Number of underlying components that make up this object. Components are
    /// accumulated by compose operations.
    /// Attempting to set this field will result in an error.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int ComponentCount {
      get { return componentCount_; }
      set {
        componentCount_ = value;
      }
    }

    /// Field number for the "md5_hash" field.
    public const int Md5HashFieldNumber = 13;
    private string md5Hash_ = "";
    ///
    /// MD5 hash of the data; encoded using base64 as per
    /// [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
    /// information about using the MD5 hash, see
    /// [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
    /// ETags: Best Practices].
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Md5Hash {
      get { return md5Hash_; }
      set {
        md5Hash_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "etag" field.
    public const int EtagFieldNumber = 14;
    private string etag_ = "";
    ///
    /// HTTP 1.1 Entity tag for the object. See
    /// [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Etag {
      get { return etag_; }
      set {
        etag_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "updated" field.
    public const int UpdatedFieldNumber = 15;
    private global::Google.Protobuf.WellKnownTypes.Timestamp updated_;
    ///
    /// The modification time of the object metadata.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp Updated {
      get { return updated_; }
      set {
        updated_ = value;
      }
    }

    /// Field number for the "storage_class" field.
    public const int StorageClassFieldNumber = 16;
    private string storageClass_ = "";
    ///
    /// Storage class of the object.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string StorageClass {
      get { return storageClass_; }
      set {
        storageClass_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "kms_key_name" field.
    public const int KmsKeyNameFieldNumber = 17;
    private string kmsKeyName_ = "";
    ///
    /// Cloud KMS Key used to encrypt this object, if the object is encrypted by
    /// such a key.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string KmsKeyName {
      get { return kmsKeyName_; }
      set {
        kmsKeyName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "time_storage_class_updated" field.
    public const int TimeStorageClassUpdatedFieldNumber = 18;
    private global::Google.Protobuf.WellKnownTypes.Timestamp timeStorageClassUpdated_;
    ///
    /// The time at which the object's storage class was last changed.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp TimeStorageClassUpdated {
      get { return timeStorageClassUpdated_; }
      set {
        timeStorageClassUpdated_ = value;
      }
    }

    /// Field number for the "temporary_hold" field.
    public const int TemporaryHoldFieldNumber = 19;
    private bool temporaryHold_;
    ///
    /// Whether an object is under temporary hold.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool TemporaryHold {
      get { return temporaryHold_; }
      set {
        temporaryHold_ = value;
      }
    }

    /// Field number for the "retention_expiration_time" field.
    public const int RetentionExpirationTimeFieldNumber = 20;
    private global::Google.Protobuf.WellKnownTypes.Timestamp retentionExpirationTime_;
    ///
    /// A server-determined value that specifies the earliest time that the
    /// object's retention period expires.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp RetentionExpirationTime {
      get { return retentionExpirationTime_; }
      set {
        retentionExpirationTime_ = value;
      }
    }

    /// Field number for the "metadata" field.
    public const int MetadataFieldNumber = 21;
    private static readonly pbc::MapField<string, string>.Codec _map_metadata_codec
        = new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 170);
    private readonly pbc::MapField<string, string> metadata_ = new pbc::MapField<string, string>();
    ///
    /// User-provided metadata, in key/value pairs.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public pbc::MapField<string, string> Metadata {
      get { return metadata_; }
    }

    /// Field number for the "event_based_hold" field.
    public const int EventBasedHoldFieldNumber = 29;
    private bool eventBasedHold_;
    ///
    /// Whether an object is under event-based hold.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool EventBasedHold {
      get { return eventBasedHold_; }
      set {
        eventBasedHold_ = value;
      }
    }

    /// Field number for the "name" field.
    public const int NameFieldNumber = 23;
    private string name_ = "";
    ///
    /// The name of the object.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Name {
      get { return name_; }
      set {
        name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "id" field.
    public const int IdFieldNumber = 24;
    private string id_ = "";
    ///
    /// The ID of the object, including the bucket name, object name, and
    /// generation number.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Id {
      get { return id_; }
      set {
        id_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "bucket" field.
    public const int BucketFieldNumber = 25;
    private string bucket_ = "";
    ///
    /// The name of the bucket containing this object.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Bucket {
      get { return bucket_; }
      set {
        bucket_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "generation" field.
    public const int GenerationFieldNumber = 26;
    private long generation_;
    ///
    /// The content generation of this object. Used for object versioning.
    /// Attempting to set this field will result in an error.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public long Generation {
      get { return generation_; }
      set {
        generation_ = value;
      }
    }

    /// Field number for the "customer_encryption" field.
    public const int CustomerEncryptionFieldNumber = 28;
    private global::Google.Events.Protobuf.Cloud.Storage.V1.StorageObjectData.Types.CustomerEncryption customerEncryption_;
    ///
    /// Metadata of customer-supplied encryption key, if the object is encrypted by
    /// such a key.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Events.Protobuf.Cloud.Storage.V1.StorageObjectData.Types.CustomerEncryption CustomerEncryption {
      get { return customerEncryption_; }
      set {
        customerEncryption_ = value;
      }
    }

    /// Field number for the "media_link" field.
    public const int MediaLinkFieldNumber = 100;
    private string mediaLink_ = "";
    ///
    /// Media download link.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string MediaLink {
      get { return mediaLink_; }
      set {
        mediaLink_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "self_link" field.
    public const int SelfLinkFieldNumber = 101;
    private string selfLink_ = "";
    ///
    /// The link to this object.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string SelfLink {
      get { return selfLink_; }
      set {
        selfLink_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "kind" field.
    public const int KindFieldNumber = 102;
    private string kind_ = "";
    ///
    /// The kind of item this is. For objects, this is always "storage#object".
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Kind {
      get { return kind_; }
      set {
        kind_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as StorageObjectData);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(StorageObjectData other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (ContentEncoding != other.ContentEncoding) return false;
      if (ContentDisposition != other.ContentDisposition) return false;
      if (CacheControl != other.CacheControl) return false;
      if (ContentLanguage != other.ContentLanguage) return false;
      if (Metageneration != other.Metageneration) return false;
      if (!object.Equals(TimeDeleted, other.TimeDeleted)) return false;
      if (ContentType != other.ContentType) return false;
      if (Size != other.Size) return false;
      if (!object.Equals(TimeCreated, other.TimeCreated)) return false;
      if (Crc32C != other.Crc32C) return false;
      if (ComponentCount != other.ComponentCount) return false;
      if (Md5Hash != other.Md5Hash) return false;
      if (Etag != other.Etag) return false;
      if (!object.Equals(Updated, other.Updated)) return false;
      if (StorageClass != other.StorageClass) return false;
      if (KmsKeyName != other.KmsKeyName) return false;
      if (!object.Equals(TimeStorageClassUpdated, other.TimeStorageClassUpdated)) return false;
      if (TemporaryHold != other.TemporaryHold) return false;
      if (!object.Equals(RetentionExpirationTime, other.RetentionExpirationTime)) return false;
      if (!Metadata.Equals(other.Metadata)) return false;
      if (EventBasedHold != other.EventBasedHold) return false;
      if (Name != other.Name) return false;
      if (Id != other.Id) return false;
      if (Bucket != other.Bucket) return false;
      if (Generation != other.Generation) return false;
      if (!object.Equals(CustomerEncryption, other.CustomerEncryption)) return false;
      if (MediaLink != other.MediaLink) return false;
      if (SelfLink != other.SelfLink) return false;
      if (Kind != other.Kind) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (ContentEncoding.Length != 0) hash ^= ContentEncoding.GetHashCode();
      if (ContentDisposition.Length != 0) hash ^= ContentDisposition.GetHashCode();
      if (CacheControl.Length != 0) hash ^= CacheControl.GetHashCode();
      if (ContentLanguage.Length != 0) hash ^= ContentLanguage.GetHashCode();
      if (Metageneration != 0L) hash ^= Metageneration.GetHashCode();
      if (timeDeleted_ != null) hash ^= TimeDeleted.GetHashCode();
      if (ContentType.Length != 0) hash ^= ContentType.GetHashCode();
      if (Size != 0L) hash ^= Size.GetHashCode();
      if (timeCreated_ != null) hash ^= TimeCreated.GetHashCode();
      if (Crc32C.Length != 0) hash ^= Crc32C.GetHashCode();
      if (ComponentCount != 0) hash ^= ComponentCount.GetHashCode();
      if (Md5Hash.Length != 0) hash ^= Md5Hash.GetHashCode();
      if (Etag.Length != 0) hash ^= Etag.GetHashCode();
      if (updated_ != null) hash ^= Updated.GetHashCode();
      if (StorageClass.Length != 0) hash ^= StorageClass.GetHashCode();
      if (KmsKeyName.Length != 0) hash ^= KmsKeyName.GetHashCode();
      if (timeStorageClassUpdated_ != null) hash ^= TimeStorageClassUpdated.GetHashCode();
      if (TemporaryHold != false) hash ^= TemporaryHold.GetHashCode();
      if (retentionExpirationTime_ != null) hash ^= RetentionExpirationTime.GetHashCode();
      hash ^= Metadata.GetHashCode();
      if (EventBasedHold != false) hash ^= EventBasedHold.GetHashCode();
      if (Name.Length != 0) hash ^= Name.GetHashCode();
      if (Id.Length != 0) hash ^= Id.GetHashCode();
      if (Bucket.Length != 0) hash ^= Bucket.GetHashCode();
      if (Generation != 0L) hash ^= Generation.GetHashCode();
      if (customerEncryption_ != null) hash ^= CustomerEncryption.GetHashCode();
      if (MediaLink.Length != 0) hash ^= MediaLink.GetHashCode();
      if (SelfLink.Length != 0) hash ^= SelfLink.GetHashCode();
      if (Kind.Length != 0) hash ^= Kind.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (ContentEncoding.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(ContentEncoding);
      }
      if (ContentDisposition.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(ContentDisposition);
      }
      if (CacheControl.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(CacheControl);
      }
      if (ContentLanguage.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(ContentLanguage);
      }
      if (Metageneration != 0L) {
        output.WriteRawTag(48);
        output.WriteInt64(Metageneration);
      }
      if (timeDeleted_ != null) {
        output.WriteRawTag(58);
        output.WriteMessage(TimeDeleted);
      }
      if (ContentType.Length != 0) {
        output.WriteRawTag(66);
        output.WriteString(ContentType);
      }
      if (Size != 0L) {
        output.WriteRawTag(72);
        output.WriteInt64(Size);
      }
      if (timeCreated_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(TimeCreated);
      }
      if (Crc32C.Length != 0) {
        output.WriteRawTag(90);
        output.WriteString(Crc32C);
      }
      if (ComponentCount != 0) {
        output.WriteRawTag(96);
        output.WriteInt32(ComponentCount);
      }
      if (Md5Hash.Length != 0) {
        output.WriteRawTag(106);
        output.WriteString(Md5Hash);
      }
      if (Etag.Length != 0) {
        output.WriteRawTag(114);
        output.WriteString(Etag);
      }
      if (updated_ != null) {
        output.WriteRawTag(122);
        output.WriteMessage(Updated);
      }
      if (StorageClass.Length != 0) {
        output.WriteRawTag(130, 1);
        output.WriteString(StorageClass);
      }
      if (KmsKeyName.Length != 0) {
        output.WriteRawTag(138, 1);
        output.WriteString(KmsKeyName);
      }
      if (timeStorageClassUpdated_ != null) {
        output.WriteRawTag(146, 1);
        output.WriteMessage(TimeStorageClassUpdated);
      }
      if (TemporaryHold != false) {
        output.WriteRawTag(152, 1);
        output.WriteBool(TemporaryHold);
      }
      if (retentionExpirationTime_ != null) {
        output.WriteRawTag(162, 1);
        output.WriteMessage(RetentionExpirationTime);
      }
      metadata_.WriteTo(output, _map_metadata_codec);
      if (Name.Length != 0) {
        output.WriteRawTag(186, 1);
        output.WriteString(Name);
      }
      if (Id.Length != 0) {
        output.WriteRawTag(194, 1);
        output.WriteString(Id);
      }
      if (Bucket.Length != 0) {
        output.WriteRawTag(202, 1);
        output.WriteString(Bucket);
      }
      if (Generation != 0L) {
        output.WriteRawTag(208, 1);
        output.WriteInt64(Generation);
      }
      if (customerEncryption_ != null) {
        output.WriteRawTag(226, 1);
        output.WriteMessage(CustomerEncryption);
      }
      if (EventBasedHold != false) {
        output.WriteRawTag(232, 1);
        output.WriteBool(EventBasedHold);
      }
      if (MediaLink.Length != 0) {
        output.WriteRawTag(162, 6);
        output.WriteString(MediaLink);
      }
      if (SelfLink.Length != 0) {
        output.WriteRawTag(170, 6);
        output.WriteString(SelfLink);
      }
      if (Kind.Length != 0) {
        output.WriteRawTag(178, 6);
        output.WriteString(Kind);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (ContentEncoding.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(ContentEncoding);
      }
      if (ContentDisposition.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(ContentDisposition);
      }
      if (CacheControl.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(CacheControl);
      }
      if (ContentLanguage.Length != 0) {
        output.WriteRawTag(42);
        output.WriteString(ContentLanguage);
      }
      if (Metageneration != 0L) {
        output.WriteRawTag(48);
        output.WriteInt64(Metageneration);
      }
      if (timeDeleted_ != null) {
        output.WriteRawTag(58);
        output.WriteMessage(TimeDeleted);
      }
      if (ContentType.Length != 0) {
        output.WriteRawTag(66);
        output.WriteString(ContentType);
      }
      if (Size != 0L) {
        output.WriteRawTag(72);
        output.WriteInt64(Size);
      }
      if (timeCreated_ != null) {
        output.WriteRawTag(82);
        output.WriteMessage(TimeCreated);
      }
      if (Crc32C.Length != 0) {
        output.WriteRawTag(90);
        output.WriteString(Crc32C);
      }
      if (ComponentCount != 0) {
        output.WriteRawTag(96);
        output.WriteInt32(ComponentCount);
      }
      if (Md5Hash.Length != 0) {
        output.WriteRawTag(106);
        output.WriteString(Md5Hash);
      }
      if (Etag.Length != 0) {
        output.WriteRawTag(114);
        output.WriteString(Etag);
      }
      if (updated_ != null) {
        output.WriteRawTag(122);
        output.WriteMessage(Updated);
      }
      if (StorageClass.Length != 0) {
        output.WriteRawTag(130, 1);
        output.WriteString(StorageClass);
      }
      if (KmsKeyName.Length != 0) {
        output.WriteRawTag(138, 1);
        output.WriteString(KmsKeyName);
      }
      if (timeStorageClassUpdated_ != null) {
        output.WriteRawTag(146, 1);
        output.WriteMessage(TimeStorageClassUpdated);
      }
      if (TemporaryHold != false) {
        output.WriteRawTag(152, 1);
        output.WriteBool(TemporaryHold);
      }
      if (retentionExpirationTime_ != null) {
        output.WriteRawTag(162, 1);
        output.WriteMessage(RetentionExpirationTime);
      }
      metadata_.WriteTo(ref output, _map_metadata_codec);
      if (Name.Length != 0) {
        output.WriteRawTag(186, 1);
        output.WriteString(Name);
      }
      if (Id.Length != 0) {
        output.WriteRawTag(194, 1);
        output.WriteString(Id);
      }
      if (Bucket.Length != 0) {
        output.WriteRawTag(202, 1);
        output.WriteString(Bucket);
      }
      if (Generation != 0L) {
        output.WriteRawTag(208, 1);
        output.WriteInt64(Generation);
      }
      if (customerEncryption_ != null) {
        output.WriteRawTag(226, 1);
        output.WriteMessage(CustomerEncryption);
      }
      if (EventBasedHold != false) {
        output.WriteRawTag(232, 1);
        output.WriteBool(EventBasedHold);
      }
      if (MediaLink.Length != 0) {
        output.WriteRawTag(162, 6);
        output.WriteString(MediaLink);
      }
      if (SelfLink.Length != 0) {
        output.WriteRawTag(170, 6);
        output.WriteString(SelfLink);
      }
      if (Kind.Length != 0) {
        output.WriteRawTag(178, 6);
        output.WriteString(Kind);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (ContentEncoding.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ContentEncoding);
      }
      if (ContentDisposition.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ContentDisposition);
      }
      if (CacheControl.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(CacheControl);
      }
      if (ContentLanguage.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ContentLanguage);
      }
      if (Metageneration != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Metageneration);
      }
      if (timeDeleted_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TimeDeleted);
      }
      if (ContentType.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ContentType);
      }
      if (Size != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Size);
      }
      if (timeCreated_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TimeCreated);
      }
      if (Crc32C.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Crc32C);
      }
      if (ComponentCount != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(ComponentCount);
      }
      if (Md5Hash.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Md5Hash);
      }
      if (Etag.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Etag);
      }
      if (updated_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Updated);
      }
      if (StorageClass.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(StorageClass);
      }
      if (KmsKeyName.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(KmsKeyName);
      }
      if (timeStorageClassUpdated_ != null) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(TimeStorageClassUpdated);
      }
      if (TemporaryHold != false) {
        size += 2 + 1;
      }
      if (retentionExpirationTime_ != null) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(RetentionExpirationTime);
      }
      size += metadata_.CalculateSize(_map_metadata_codec);
      if (EventBasedHold != false) {
        size += 2 + 1;
      }
      if (Name.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(Name);
      }
      if (Id.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(Id);
      }
      if (Bucket.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(Bucket);
      }
      if (Generation != 0L) {
        size += 2 + pb::CodedOutputStream.ComputeInt64Size(Generation);
      }
      if (customerEncryption_ != null) {
        size += 2 + pb::CodedOutputStream.ComputeMessageSize(CustomerEncryption);
      }
      if (MediaLink.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(MediaLink);
      }
      if (SelfLink.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(SelfLink);
      }
      if (Kind.Length != 0) {
        size += 2 + pb::CodedOutputStream.ComputeStringSize(Kind);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(StorageObjectData other) {
      if (other == null) {
        return;
      }
      if (other.ContentEncoding.Length != 0) {
        ContentEncoding = other.ContentEncoding;
      }
      if (other.ContentDisposition.Length != 0) {
        ContentDisposition = other.ContentDisposition;
      }
      if (other.CacheControl.Length != 0) {
        CacheControl = other.CacheControl;
      }
      if (other.ContentLanguage.Length != 0) {
        ContentLanguage = other.ContentLanguage;
      }
      if (other.Metageneration != 0L) {
        Metageneration = other.Metageneration;
      }
      if (other.timeDeleted_ != null) {
        if (timeDeleted_ == null) {
          TimeDeleted = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        TimeDeleted.MergeFrom(other.TimeDeleted);
      }
      if (other.ContentType.Length != 0) {
        ContentType = other.ContentType;
      }
      if (other.Size != 0L) {
        Size = other.Size;
      }
      if (other.timeCreated_ != null) {
        if (timeCreated_ == null) {
          TimeCreated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        TimeCreated.MergeFrom(other.TimeCreated);
      }
      if (other.Crc32C.Length != 0) {
        Crc32C = other.Crc32C;
      }
      if (other.ComponentCount != 0) {
        ComponentCount = other.ComponentCount;
      }
      if (other.Md5Hash.Length != 0) {
        Md5Hash = other.Md5Hash;
      }
      if (other.Etag.Length != 0) {
        Etag = other.Etag;
      }
      if (other.updated_ != null) {
        if (updated_ == null) {
          Updated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Updated.MergeFrom(other.Updated);
      }
      if (other.StorageClass.Length != 0) {
        StorageClass = other.StorageClass;
      }
      if (other.KmsKeyName.Length != 0) {
        KmsKeyName = other.KmsKeyName;
      }
      if (other.timeStorageClassUpdated_ != null) {
        if (timeStorageClassUpdated_ == null) {
          TimeStorageClassUpdated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        TimeStorageClassUpdated.MergeFrom(other.TimeStorageClassUpdated);
      }
      if (other.TemporaryHold != false) {
        TemporaryHold = other.TemporaryHold;
      }
      if (other.retentionExpirationTime_ != null) {
        if (retentionExpirationTime_ == null) {
          RetentionExpirationTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        RetentionExpirationTime.MergeFrom(other.RetentionExpirationTime);
      }
      metadata_.Add(other.metadata_);
      if (other.EventBasedHold != false) {
        EventBasedHold = other.EventBasedHold;
      }
      if (other.Name.Length != 0) {
        Name = other.Name;
      }
      if (other.Id.Length != 0) {
        Id = other.Id;
      }
      if (other.Bucket.Length != 0) {
        Bucket = other.Bucket;
      }
      if (other.Generation != 0L) {
        Generation = other.Generation;
      }
      if (other.customerEncryption_ != null) {
        if (customerEncryption_ == null) {
          CustomerEncryption = new global::Google.Events.Protobuf.Cloud.Storage.V1.StorageObjectData.Types.CustomerEncryption();
        }
        CustomerEncryption.MergeFrom(other.CustomerEncryption);
      }
      if (other.MediaLink.Length != 0) {
        MediaLink = other.MediaLink;
      }
      if (other.SelfLink.Length != 0) {
        SelfLink = other.SelfLink;
      }
      if (other.Kind.Length != 0) {
        Kind = other.Kind;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            ContentEncoding = input.ReadString();
            break;
          }
          case 18: {
            ContentDisposition = input.ReadString();
            break;
          }
          case 26: {
            CacheControl = input.ReadString();
            break;
          }
          case 42: {
            ContentLanguage = input.ReadString();
            break;
          }
          case 48: {
            Metageneration = input.ReadInt64();
            break;
          }
          case 58: {
            if (timeDeleted_ == null) {
              TimeDeleted = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(TimeDeleted);
            break;
          }
          case 66: {
            ContentType = input.ReadString();
            break;
          }
          case 72: {
            Size = input.ReadInt64();
            break;
          }
          case 82: {
            if (timeCreated_ == null) {
              TimeCreated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(TimeCreated);
            break;
          }
          case 90: {
            Crc32C = input.ReadString();
            break;
          }
          case 96: {
            ComponentCount = input.ReadInt32();
            break;
          }
          case 106: {
            Md5Hash = input.ReadString();
            break;
          }
          case 114: {
            Etag = input.ReadString();
            break;
          }
          case 122: {
            if (updated_ == null) {
              Updated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Updated);
            break;
          }
          case 130: {
            StorageClass = input.ReadString();
            break;
          }
          case 138: {
            KmsKeyName = input.ReadString();
            break;
          }
          case 146: {
            if (timeStorageClassUpdated_ == null) {
              TimeStorageClassUpdated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(TimeStorageClassUpdated);
            break;
          }
          case 152: {
            TemporaryHold = input.ReadBool();
            break;
          }
          case 162: {
            if (retentionExpirationTime_ == null) {
              RetentionExpirationTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(RetentionExpirationTime);
            break;
          }
          case 170: {
            metadata_.AddEntriesFrom(input, _map_metadata_codec);
            break;
          }
          case 186: {
            Name = input.ReadString();
            break;
          }
          case 194: {
            Id = input.ReadString();
            break;
          }
          case 202: {
            Bucket = input.ReadString();
            break;
          }
          case 208: {
            Generation = input.ReadInt64();
            break;
          }
          case 226: {
            if (customerEncryption_ == null) {
              CustomerEncryption = new global::Google.Events.Protobuf.Cloud.Storage.V1.StorageObjectData.Types.CustomerEncryption();
            }
            input.ReadMessage(CustomerEncryption);
            break;
          }
          case 232: {
            EventBasedHold = input.ReadBool();
            break;
          }
          case 802: {
            MediaLink = input.ReadString();
            break;
          }
          case 810: {
            SelfLink = input.ReadString();
            break;
          }
          case 818: {
            Kind = input.ReadString();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            ContentEncoding = input.ReadString();
            break;
          }
          case 18: {
            ContentDisposition = input.ReadString();
            break;
          }
          case 26: {
            CacheControl = input.ReadString();
            break;
          }
          case 42: {
            ContentLanguage = input.ReadString();
            break;
          }
          case 48: {
            Metageneration = input.ReadInt64();
            break;
          }
          case 58: {
            if (timeDeleted_ == null) {
              TimeDeleted = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(TimeDeleted);
            break;
          }
          case 66: {
            ContentType = input.ReadString();
            break;
          }
          case 72: {
            Size = input.ReadInt64();
            break;
          }
          case 82: {
            if (timeCreated_ == null) {
              TimeCreated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(TimeCreated);
            break;
          }
          case 90: {
            Crc32C = input.ReadString();
            break;
          }
          case 96: {
            ComponentCount = input.ReadInt32();
            break;
          }
          case 106: {
            Md5Hash = input.ReadString();
            break;
          }
          case 114: {
            Etag = input.ReadString();
            break;
          }
          case 122: {
            if (updated_ == null) {
              Updated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Updated);
            break;
          }
          case 130: {
            StorageClass = input.ReadString();
            break;
          }
          case 138: {
            KmsKeyName = input.ReadString();
            break;
          }
          case 146: {
            if (timeStorageClassUpdated_ == null) {
              TimeStorageClassUpdated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(TimeStorageClassUpdated);
            break;
          }
          case 152: {
            TemporaryHold = input.ReadBool();
            break;
          }
          case 162: {
            if (retentionExpirationTime_ == null) {
              RetentionExpirationTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(RetentionExpirationTime);
            break;
          }
          case 170: {
            metadata_.AddEntriesFrom(ref input, _map_metadata_codec);
            break;
          }
          case 186: {
            Name = input.ReadString();
            break;
          }
          case 194: {
            Id = input.ReadString();
            break;
          }
          case 202: {
            Bucket = input.ReadString();
            break;
          }
          case 208: {
            Generation = input.ReadInt64();
            break;
          }
          case 226: {
            if (customerEncryption_ == null) {
              CustomerEncryption = new global::Google.Events.Protobuf.Cloud.Storage.V1.StorageObjectData.Types.CustomerEncryption();
            }
            input.ReadMessage(CustomerEncryption);
            break;
          }
          case 232: {
            EventBasedHold = input.ReadBool();
            break;
          }
          case 802: {
            MediaLink = input.ReadString();
            break;
          }
          case 810: {
            SelfLink = input.ReadString();
            break;
          }
          case 818: {
            Kind = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

    #region Nested types
    /// Container for nested types declared in the StorageObjectData message type.
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static partial class Types {
      ///
      /// Describes the customer-specified mechanism used to store the data at rest.
      ///
      public sealed partial class CustomerEncryption : pb::IMessage<CustomerEncryption>
      #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
          , pb::IBufferMessage
      #endif
      {
        private static readonly pb::MessageParser<CustomerEncryption> _parser = new pb::MessageParser<CustomerEncryption>(() => new CustomerEncryption());
        private pb::UnknownFieldSet _unknownFields;
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public static pb::MessageParser<CustomerEncryption> Parser { get { return _parser; } }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public static pbr::MessageDescriptor Descriptor {
          get { return global::Google.Events.Protobuf.Cloud.Storage.V1.StorageObjectData.Descriptor.NestedTypes[0]; }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        pbr::MessageDescriptor pb::IMessage.Descriptor {
          get { return Descriptor; }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public CustomerEncryption() {
          OnConstruction();
        }

        partial void OnConstruction();

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public CustomerEncryption(CustomerEncryption other) : this() {
          encryptionAlgorithm_ = other.encryptionAlgorithm_;
          keySha256_ = other.keySha256_;
          _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public CustomerEncryption Clone() {
          return new CustomerEncryption(this);
        }

        /// Field number for the "encryption_algorithm" field.
        public const int EncryptionAlgorithmFieldNumber = 1;
        private string encryptionAlgorithm_ = "";
        ///
        /// The encryption algorithm.
        ///
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public string EncryptionAlgorithm {
          get { return encryptionAlgorithm_; }
          set {
            encryptionAlgorithm_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
          }
        }

        /// Field number for the "key_sha256" field.
        public const int KeySha256FieldNumber = 2;
        private string keySha256_ = "";
        ///
        /// SHA256 hash value of the encryption key.
        ///
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public string KeySha256 {
          get { return keySha256_; }
          set {
            keySha256_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
          }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public override bool Equals(object other) {
          return Equals(other as CustomerEncryption);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public bool Equals(CustomerEncryption other) {
          if (ReferenceEquals(other, null)) {
            return false;
          }
          if (ReferenceEquals(other, this)) {
            return true;
          }
          if (EncryptionAlgorithm != other.EncryptionAlgorithm) return false;
          if (KeySha256 != other.KeySha256) return false;
          return Equals(_unknownFields, other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public override int GetHashCode() {
          int hash = 1;
          if (EncryptionAlgorithm.Length != 0) hash ^= EncryptionAlgorithm.GetHashCode();
          if (KeySha256.Length != 0) hash ^= KeySha256.GetHashCode();
          if (_unknownFields != null) {
            hash ^= _unknownFields.GetHashCode();
          }
          return hash;
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public override string ToString() {
          return pb::JsonFormatter.ToDiagnosticString(this);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void WriteTo(pb::CodedOutputStream output) {
        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
          output.WriteRawMessage(this);
        #else
          if (EncryptionAlgorithm.Length != 0) {
            output.WriteRawTag(10);
            output.WriteString(EncryptionAlgorithm);
          }
          if (KeySha256.Length != 0) {
            output.WriteRawTag(18);
            output.WriteString(KeySha256);
          }
          if (_unknownFields != null) {
            _unknownFields.WriteTo(output);
          }
        #endif
        }

        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
          if (EncryptionAlgorithm.Length != 0) {
            output.WriteRawTag(10);
            output.WriteString(EncryptionAlgorithm);
          }
          if (KeySha256.Length != 0) {
            output.WriteRawTag(18);
            output.WriteString(KeySha256);
          }
          if (_unknownFields != null) {
            _unknownFields.WriteTo(ref output);
          }
        }
        #endif

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public int CalculateSize() {
          int size = 0;
          if (EncryptionAlgorithm.Length != 0) {
            size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptionAlgorithm);
          }
          if (KeySha256.Length != 0) {
            size += 1 + pb::CodedOutputStream.ComputeStringSize(KeySha256);
          }
          if (_unknownFields != null) {
            size += _unknownFields.CalculateSize();
          }
          return size;
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void MergeFrom(CustomerEncryption other) {
          if (other == null) {
            return;
          }
          if (other.EncryptionAlgorithm.Length != 0) {
            EncryptionAlgorithm = other.EncryptionAlgorithm;
          }
          if (other.KeySha256.Length != 0) {
            KeySha256 = other.KeySha256;
          }
          _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void MergeFrom(pb::CodedInputStream input) {
        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
          input.ReadRawMessage(this);
        #else
          uint tag;
          while ((tag = input.ReadTag()) != 0) {
            switch(tag) {
              default:
                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                break;
              case 10: {
                EncryptionAlgorithm = input.ReadString();
                break;
              }
              case 18: {
                KeySha256 = input.ReadString();
                break;
              }
            }
          }
        #endif
        }

        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
          uint tag;
          while ((tag = input.ReadTag()) != 0) {
            switch(tag) {
              default:
                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
                break;
              case 10: {
                EncryptionAlgorithm = input.ReadString();
                break;
              }
              case 18: {
                KeySha256 = input.ReadString();
                break;
              }
            }
          }
        }
        #endif

      }

    }
    #endregion

  }

  #endregion

}

#endregion Designer generated code


text:
<?php
/**
 * Laravel Propel integration
 *
 * @author    Alex Kazinskiy <alboo@list.ru>
 * @author    Alexander Zhuravlev <scif-1986@ya.ru>
 * @author    Maxim Soloviev <BigShark666@gmail.com>
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
 * @link      https://github.com/propelorm/PropelLaravel
 */

namespace Propel\PropelLaravel;

use Illuminate\Support\ServiceProvider;
use Symfony\Component\Finder\Finder;

class GeneratorServiceProvider extends ServiceProvider
{

    /**
     * Indicates if loading of the provider is deferred.
     *
     * @var bool
     */
    protected $defer = true;

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $finder = new Finder();
        $finder->files()->name('*.php')->in(__DIR__.'/../../../propel/propel/src/Propel/Generator/Command')->depth(0);

        $commands = [];
        foreach ($finder as $file) {
            $ns = '\\Propel\\Generator\\Command';
            $r  = new \ReflectionClass($ns.'\\'.$file->getBasename('.php'));
            if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract()) {
                $c = $r->newInstance();

                $command = 'command.propel.' . $c->getName();
                $commands[] = $command;

                $c->setName('propel:' . $c->getName());
                $c->setAliases([]);

                $this->app->singleton(
                    $command,
                    function ($app) use ($c) {
                        return $c;
                    }
                );
            }
        }

        $commands[] = Commands\CreateSchema::class;

        $this->commands($commands);
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return array('command.propel');
    }

}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Labs64">
    <link rel="shortcut icon" href="favicon.ico">

    <title>Dynamic Web Cookbook by Labs64</title>

    <link href='http://fonts.googleapis.com/css?family=Metrophobic' rel='stylesheet' type='text/css'>

    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link href="css/labs64-theme.css" rel="stylesheet">

Dynamic Web Cookbook

Collected code examples of HTML, CSS, JavaScript and other WEBby stuff.

View on
            GitHub

                Working with Google Maps – Marker
                    Drag&Drop

                Working with Canvas – The new technology of
                    vector animation

© Labs64 2014

Imprint