Skip to content

Commit

Permalink
Add DeviceHub endpoint mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaumov committed Jan 31, 2020
1 parent 618eb3f commit 3abd4b1
Show file tree
Hide file tree
Showing 10 changed files with 1,237 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4FDDE01D-C802-4E52-9458-B614B1C8EFAB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Acumatica.DeviceHub_17._200._001</RootNamespace>
<AssemblyName>Acumatica.DeviceHub_17.200.001</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.ComponentModel.Annotations.4.7.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Runtime.Serialization.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Api\PrinterApi.cs" />
<Compile Include="Api\PrintJobApi.cs" />
<Compile Include="Model\Printer.cs" />
<Compile Include="Model\PrintJob.cs" />
<Compile Include="Model\Actions\UpdatePrinterList.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Acumatica.RESTClient\Acumatica.RESTClient.csproj">
<Project>{25008D3F-3D78-4BB9-B14B-0A792AE97892}</Project>
<Name>Acumatica.RESTClient</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
20 changes: 20 additions & 0 deletions Acumatica.DeviceHub_17.200.001/Api/PrintJobApi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Acumatica.RESTClient.Api;
using Acumatica.RESTClient.Client;
using Acumatica.DeviceHub_17_200_001.Model;

namespace Acumatica.DeviceHub_17_200_001.Api
{
public partial class PrintJobApi : EntityAPI<PrintJob>
{
public PrintJobApi() : base()
{
}
public PrintJobApi(Configuration configuration) : base(configuration)
{
}
}
}
24 changes: 24 additions & 0 deletions Acumatica.DeviceHub_17.200.001/Api/PrinterApi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Acumatica.RESTClient.Api;
using Acumatica.RESTClient.Client;
using Acumatica.DeviceHub_17_200_001.Model;

namespace Acumatica.DeviceHub_17_200_001.Api
{
public partial class PrinterApi : EntityAPI<Printer>
{
public PrinterApi() : base()
{
}
public PrinterApi(Configuration configuration) : base(configuration)
{
}
public string InvokeUpdatePrinterListAction(Printer printer)
{
return InvokeAction(new UpdatePrinterList(printer));
}
}
}
26 changes: 26 additions & 0 deletions Acumatica.DeviceHub_17.200.001/Model/Actions/UpdatePrinterList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

using Acumatica.RESTClient.Model;
using System.Runtime.Serialization;

namespace Acumatica.DeviceHub_17_200_001.Model
{
[DataContract]
public partial class UpdatePrinterList : EntityAction<Printer>
{
public UpdatePrinterList(Printer entity) : base(entity)
{ }

[DataMember(Name = "entity", EmitDefaultValue = false)]
public Printer Entity
{
get
{
return _Entity;
}
set
{
_Entity = value;
}
}
}
}
238 changes: 238 additions & 0 deletions Acumatica.DeviceHub_17.200.001/Model/PrintJob.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
/*
* DeviceHub/17.200.001
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 3
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/

using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using Acumatica.RESTClient.Model;

namespace Acumatica.DeviceHub_17_200_001.Model
{
/// <summary>
/// PrintJob
/// </summary>
[DataContract]
public partial class PrintJob : Entity, IEquatable<PrintJob>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="PrintJob" /> class.
/// </summary>
/// <param name="createdBy">createdBy.</param>
/// <param name="creationDateTime">creationDateTime.</param>
/// <param name="description">description.</param>
/// <param name="jobID">jobID.</param>
/// <param name="printer">printer.</param>
/// <param name="reportID">reportID.</param>
/// <param name="selected">selected.</param>
/// <param name="status">status.</param>
public PrintJob(StringValue createdBy = default(StringValue), DateTimeValue creationDateTime = default(DateTimeValue), StringValue description = default(StringValue), IntValue jobID = default(IntValue), StringValue printer = default(StringValue), StringValue reportID = default(StringValue), BooleanValue selected = default(BooleanValue), StringValue status = default(StringValue), Guid? id = default(Guid?), long? rowNumber = default(long?), string note = default(string), Dictionary<string, Dictionary<string, CustomField>> custom = default(Dictionary<string, Dictionary<string, CustomField>>), List<FileLink> files = default(List<FileLink>)) : base(id, rowNumber, note, custom, files)
{
this.CreatedBy = createdBy;
this.CreationDateTime = creationDateTime;
this.Description = description;
this.JobID = jobID;
this.Printer = printer;
this.ReportID = reportID;
this.Selected = selected;
this.Status = status;
}

/// <summary>
/// Gets or Sets CreatedBy
/// </summary>
[DataMember(Name="CreatedBy", EmitDefaultValue=false)]
public StringValue CreatedBy { get; set; }

/// <summary>
/// Gets or Sets CreationDateTime
/// </summary>
[DataMember(Name="CreationDateTime", EmitDefaultValue=false)]
public DateTimeValue CreationDateTime { get; set; }

/// <summary>
/// Gets or Sets Description
/// </summary>
[DataMember(Name="Description", EmitDefaultValue=false)]
public StringValue Description { get; set; }

/// <summary>
/// Gets or Sets JobID
/// </summary>
[DataMember(Name="JobID", EmitDefaultValue=false)]
public IntValue JobID { get; set; }

/// <summary>
/// Gets or Sets Printer
/// </summary>
[DataMember(Name="Printer", EmitDefaultValue=false)]
public StringValue Printer { get; set; }

/// <summary>
/// Gets or Sets ReportID
/// </summary>
[DataMember(Name="ReportID", EmitDefaultValue=false)]
public StringValue ReportID { get; set; }

/// <summary>
/// Gets or Sets Selected
/// </summary>
[DataMember(Name="Selected", EmitDefaultValue=false)]
public BooleanValue Selected { get; set; }

/// <summary>
/// Gets or Sets Status
/// </summary>
[DataMember(Name="Status", EmitDefaultValue=false)]
public StringValue Status { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class PrintJob {\n");
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n");
sb.Append(" CreationDateTime: ").Append(CreationDateTime).Append("\n");
sb.Append(" Description: ").Append(Description).Append("\n");
sb.Append(" JobID: ").Append(JobID).Append("\n");
sb.Append(" Printer: ").Append(Printer).Append("\n");
sb.Append(" ReportID: ").Append(ReportID).Append("\n");
sb.Append(" Selected: ").Append(Selected).Append("\n");
sb.Append(" Status: ").Append(Status).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public override string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as PrintJob);
}

/// <summary>
/// Returns true if PrintJob instances are equal
/// </summary>
/// <param name="input">Instance of PrintJob to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(PrintJob input)
{
if (input == null)
return false;

return base.Equals(input) &&
(
this.CreatedBy == input.CreatedBy ||
(this.CreatedBy != null &&
this.CreatedBy.Equals(input.CreatedBy))
) && base.Equals(input) &&
(
this.CreationDateTime == input.CreationDateTime ||
(this.CreationDateTime != null &&
this.CreationDateTime.Equals(input.CreationDateTime))
) && base.Equals(input) &&
(
this.Description == input.Description ||
(this.Description != null &&
this.Description.Equals(input.Description))
) && base.Equals(input) &&
(
this.JobID == input.JobID ||
(this.JobID != null &&
this.JobID.Equals(input.JobID))
) && base.Equals(input) &&
(
this.Printer == input.Printer ||
(this.Printer != null &&
this.Printer.Equals(input.Printer))
) && base.Equals(input) &&
(
this.ReportID == input.ReportID ||
(this.ReportID != null &&
this.ReportID.Equals(input.ReportID))
) && base.Equals(input) &&
(
this.Selected == input.Selected ||
(this.Selected != null &&
this.Selected.Equals(input.Selected))
) && base.Equals(input) &&
(
this.Status == input.Status ||
(this.Status != null &&
this.Status.Equals(input.Status))
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = base.GetHashCode();
if (this.CreatedBy != null)
hashCode = hashCode * 59 + this.CreatedBy.GetHashCode();
if (this.CreationDateTime != null)
hashCode = hashCode * 59 + this.CreationDateTime.GetHashCode();
if (this.Description != null)
hashCode = hashCode * 59 + this.Description.GetHashCode();
if (this.JobID != null)
hashCode = hashCode * 59 + this.JobID.GetHashCode();
if (this.Printer != null)
hashCode = hashCode * 59 + this.Printer.GetHashCode();
if (this.ReportID != null)
hashCode = hashCode * 59 + this.ReportID.GetHashCode();
if (this.Selected != null)
hashCode = hashCode * 59 + this.Selected.GetHashCode();
if (this.Status != null)
hashCode = hashCode * 59 + this.Status.GetHashCode();
return hashCode;
}
}

/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
foreach(var x in BaseValidate(validationContext)) yield return x;
yield break;
}
}

}
Loading

0 comments on commit 3abd4b1

Please sign in to comment.