]> git.proxmox.com Git - ceph.git/blame - ceph/src/arrow/csharp/src/Apache.Arrow.Flight/FlightActionType.cs
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / csharp / src / Apache.Arrow.Flight / FlightActionType.cs
CommitLineData
1d09f67e
TL
1// Licensed to the Apache Software Foundation (ASF) under one or more
2// contributor license agreements. See the NOTICE file distributed with
3// this work for additional information regarding copyright ownership.
4// The ASF licenses this file to You under the Apache License, Version 2.0
5// (the "License"); you may not use this file except in compliance with
6// the License. You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16using System;
17using System.Collections.Generic;
18using System.Text;
19
20namespace Apache.Arrow.Flight
21{
22 public class FlightActionType
23 {
24 private readonly Protocol.ActionType _actionType;
25 internal FlightActionType(Protocol.ActionType actionType)
26 {
27 _actionType = actionType;
28 }
29
30 public FlightActionType(string type, string description)
31 {
32 _actionType = new Protocol.ActionType()
33 {
34 Description = description,
35 Type = type
36 };
37 }
38
39 public string Type => _actionType.Type;
40 public string Description => _actionType.Description;
41
42 internal Protocol.ActionType ToProtocol()
43 {
44 return _actionType;
45 }
46
47 public override bool Equals(object obj)
48 {
49 if(obj is FlightActionType other)
50 {
51 return Equals(_actionType, other._actionType);
52 }
53 return false;
54 }
55
56 public override int GetHashCode()
57 {
58 return _actionType.GetHashCode();
59 }
60 }
61}