blob: 2e862a73d959cbb0a596f6295e700b066652afb1 [file] [log] [blame]
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//<auto-generated />
namespace org.apache.reef.bridge.message
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Microsoft.Hadoop.Avro;
/// <summary>
/// Used to serialize and deserialize Avro record org.apache.reef.bridge.message.BridgeInterop.
/// </summary>
[DataContract(Namespace = "org.apache.reef.bridge.message")]
public partial class BridgeInterop
{
private const string JsonSchema = @"{""type"":""record"",""name"":""org.apache.reef.bridge.message.BridgeInterop"",""doc"":""Container message for all Java/CLR bridge messages in the protocol."",""fields"":[{""name"":""sequence"",""doc"":""The unique squence identifier of the message in the protocol stream."",""type"":""long""},{""name"":""messageType"",""doc"":""The type of the bridge Java/CLR interop message."",""type"":{""type"":""enum"",""name"":""org.apache.reef.bridge.message.MessageType"",""doc"":""An enumeration of all possible Java/C# bridge protocol messages."",""symbols"":[""SetupBridge"",""SystemOnStart"",""Acknowledgement""]}},{""name"":""message"",""doc"":""A union which contains the actual message."",""type"":[{""type"":""record"",""name"":""org.apache.reef.bridge.message.SetupBridge"",""doc"":""Notify the C# bridge of the http port of the Java bridge webserver."",""fields"":[{""name"":""httpServerPortNumber"",""doc"":""The Java bridge http server port number."",""type"":""int""}]},{""type"":""record"",""name"":""org.apache.reef.bridge.message.SystemOnStart"",""doc"":""Notify the C# bridge the system is now running."",""fields"":[{""name"":""dateTime"",""doc"":""Date time in seconds as a long since January 1, 1970"",""type"":""long""}]},{""type"":""record"",""name"":""org.apache.reef.bridge.message.Acknowledgement"",""doc"":""The Acknowledgement message is sent to the Java bridge to acknowledge receipt and processing of a specific message."",""fields"":[{""name"":""messageIdentifier"",""doc"":""The message identifier of the message that was successfully processed."",""type"":""long""}]},{""type"":""array"",""items"":""bytes""}]}]}";
/// <summary>
/// Gets the schema.
/// </summary>
public static string Schema
{
get
{
return JsonSchema;
}
}
/// <summary>
/// Gets or sets the sequence field.
/// </summary>
[DataMember]
public long sequence { get; set; }
/// <summary>
/// Gets or sets the messageType field.
/// </summary>
[DataMember]
public org.apache.reef.bridge.message.MessageType messageType { get; set; }
/// <summary>
/// Gets or sets the message field.
/// </summary>
[DataMember]
[AvroUnion(typeof(org.apache.reef.bridge.message.SetupBridge), typeof(org.apache.reef.bridge.message.SystemOnStart), typeof(org.apache.reef.bridge.message.Acknowledgement), typeof(List<byte[]>))]
public object message { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="BridgeInterop"/> class.
/// </summary>
public BridgeInterop()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BridgeInterop"/> class.
/// </summary>
/// <param name="sequence">The sequence.</param>
/// <param name="messageType">The messageType.</param>
/// <param name="message">The message.</param>
public BridgeInterop(long sequence, org.apache.reef.bridge.message.MessageType messageType, object message)
{
this.sequence = sequence;
this.messageType = messageType;
this.message = message;
}
}
}