Skip to content

Commit

Permalink
TNT-44663 Update Delivery API model with latest version (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
XDex committed May 30, 2022
1 parent fa0848d commit 6914059
Show file tree
Hide file tree
Showing 11 changed files with 679 additions and 24 deletions.
12 changes: 6 additions & 6 deletions Source/Adobe.Target.Delivery/Model/AnalyticsRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public partial class AnalyticsRequest : IEquatable<AnalyticsRequest>, IValidatab
/// </summary>
/// <param name="supplementalDataId">Supplemental data id, used for **server side** integrations. Format &lt;16 hexadecimal digits&gt;-&lt;16 hexadecimal digits&gt; .</param>
/// <param name="logging">logging.</param>
/// <param name="trackingServer">tracking server.</param>
/// <param name="trackingServerSecure">secure tracking server.</param>
/// <param name="trackingServer">tracking server domain (should not include http://).</param>
/// <param name="trackingServerSecure">secure tracking server domain (should not include https://).</param>
public AnalyticsRequest(string supplementalDataId = default(string), LoggingType? logging = default(LoggingType?), string trackingServer = default(string), string trackingServerSecure = default(string))
{
this.SupplementalDataId = supplementalDataId;
Expand All @@ -63,16 +63,16 @@ public partial class AnalyticsRequest : IEquatable<AnalyticsRequest>, IValidatab
public string SupplementalDataId { get; set; }

/// <summary>
/// tracking server
/// tracking server domain (should not include http://)
/// </summary>
/// <value>tracking server</value>
/// <value>tracking server domain (should not include http://)</value>
[DataMember(Name = "trackingServer", EmitDefaultValue = false)]
public string TrackingServer { get; set; }

/// <summary>
/// secure tracking server
/// secure tracking server domain (should not include https://)
/// </summary>
/// <value>secure tracking server</value>
/// <value>secure tracking server domain (should not include https://)</value>
[DataMember(Name = "trackingServerSecure", EmitDefaultValue = false)]
public string TrackingServerSecure { get; set; }

Expand Down
246 changes: 246 additions & 0 deletions Source/Adobe.Target.Delivery/Model/ClientHints.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
// <auto-generated/>
/*
* Copyright 2021 Adobe. All rights reserved.
* This file is licensed 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
* Generated by: https://github.com/openapitools/openapi-generator.git
*/

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Adobe.Target.Delivery.Client.OpenAPIDateConverter;

namespace Adobe.Target.Delivery.Model
{
/// <summary>
/// Client hints data. Used in place of userAgent if provided.
/// </summary>
[DataContract(Name = "ClientHints")]
public partial class ClientHints : IEquatable<ClientHints>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ClientHints" /> class.
/// </summary>
/// <param name="mobile">Sec-CH-UA-Mobile (low entropy).</param>
/// <param name="model">Sec-CH-UA-Model.</param>
/// <param name="platform">Sec-CH-UA-Platform (low entropy).</param>
/// <param name="platformVersion">Sec-CH-UA-Platform-Version.</param>
/// <param name="browserUAWithMajorVersion">Sec-CH-UA (low entropy).</param>
/// <param name="browserUAWithFullVersion">Sec-CH-UA-Full-Version-List.</param>
/// <param name="architecture">Sec-CH-UA-Arch.</param>
/// <param name="bitness">Sec-CH-UA-Bitness.</param>
public ClientHints(bool mobile = default(bool), string model = default(string), string platform = default(string), string platformVersion = default(string), string browserUAWithMajorVersion = default(string), string browserUAWithFullVersion = default(string), string architecture = default(string), string bitness = default(string))
{
this.Mobile = mobile;
this.Model = model;
this.Platform = platform;
this.PlatformVersion = platformVersion;
this.BrowserUAWithMajorVersion = browserUAWithMajorVersion;
this.BrowserUAWithFullVersion = browserUAWithFullVersion;
this.Architecture = architecture;
this.Bitness = bitness;
}

/// <summary>
/// Sec-CH-UA-Mobile (low entropy)
/// </summary>
/// <value>Sec-CH-UA-Mobile (low entropy)</value>
[DataMember(Name = "mobile", EmitDefaultValue = true)]
public bool Mobile { get; set; }

/// <summary>
/// Sec-CH-UA-Model
/// </summary>
/// <value>Sec-CH-UA-Model</value>
[DataMember(Name = "model", EmitDefaultValue = false)]
public string Model { get; set; }

/// <summary>
/// Sec-CH-UA-Platform (low entropy)
/// </summary>
/// <value>Sec-CH-UA-Platform (low entropy)</value>
[DataMember(Name = "platform", EmitDefaultValue = false)]
public string Platform { get; set; }

/// <summary>
/// Sec-CH-UA-Platform-Version
/// </summary>
/// <value>Sec-CH-UA-Platform-Version</value>
[DataMember(Name = "platformVersion", EmitDefaultValue = false)]
public string PlatformVersion { get; set; }

/// <summary>
/// Sec-CH-UA (low entropy)
/// </summary>
/// <value>Sec-CH-UA (low entropy)</value>
[DataMember(Name = "browserUAWithMajorVersion", EmitDefaultValue = false)]
public string BrowserUAWithMajorVersion { get; set; }

/// <summary>
/// Sec-CH-UA-Full-Version-List
/// </summary>
/// <value>Sec-CH-UA-Full-Version-List</value>
[DataMember(Name = "browserUAWithFullVersion", EmitDefaultValue = false)]
public string BrowserUAWithFullVersion { get; set; }

/// <summary>
/// Sec-CH-UA-Arch
/// </summary>
/// <value>Sec-CH-UA-Arch</value>
[DataMember(Name = "architecture", EmitDefaultValue = false)]
public string Architecture { get; set; }

/// <summary>
/// Sec-CH-UA-Bitness
/// </summary>
/// <value>Sec-CH-UA-Bitness</value>
[DataMember(Name = "bitness", EmitDefaultValue = false)]
public string Bitness { 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 ClientHints {\n");
sb.Append(" Mobile: ").Append(Mobile).Append("\n");
sb.Append(" Model: ").Append(Model).Append("\n");
sb.Append(" Platform: ").Append(Platform).Append("\n");
sb.Append(" PlatformVersion: ").Append(PlatformVersion).Append("\n");
sb.Append(" BrowserUAWithMajorVersion: ").Append(BrowserUAWithMajorVersion).Append("\n");
sb.Append(" BrowserUAWithFullVersion: ").Append(BrowserUAWithFullVersion).Append("\n");
sb.Append(" Architecture: ").Append(Architecture).Append("\n");
sb.Append(" Bitness: ").Append(Bitness).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 virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 ClientHints);
}

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

return
(
this.Mobile == input.Mobile ||
this.Mobile.Equals(input.Mobile)
) &&
(
this.Model == input.Model ||
(this.Model != null &&
this.Model.Equals(input.Model))
) &&
(
this.Platform == input.Platform ||
(this.Platform != null &&
this.Platform.Equals(input.Platform))
) &&
(
this.PlatformVersion == input.PlatformVersion ||
(this.PlatformVersion != null &&
this.PlatformVersion.Equals(input.PlatformVersion))
) &&
(
this.BrowserUAWithMajorVersion == input.BrowserUAWithMajorVersion ||
(this.BrowserUAWithMajorVersion != null &&
this.BrowserUAWithMajorVersion.Equals(input.BrowserUAWithMajorVersion))
) &&
(
this.BrowserUAWithFullVersion == input.BrowserUAWithFullVersion ||
(this.BrowserUAWithFullVersion != null &&
this.BrowserUAWithFullVersion.Equals(input.BrowserUAWithFullVersion))
) &&
(
this.Architecture == input.Architecture ||
(this.Architecture != null &&
this.Architecture.Equals(input.Architecture))
) &&
(
this.Bitness == input.Bitness ||
(this.Bitness != null &&
this.Bitness.Equals(input.Bitness))
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
hashCode = hashCode * 59 + this.Mobile.GetHashCode();
if (this.Model != null)
hashCode = hashCode * 59 + this.Model.GetHashCode();
if (this.Platform != null)
hashCode = hashCode * 59 + this.Platform.GetHashCode();
if (this.PlatformVersion != null)
hashCode = hashCode * 59 + this.PlatformVersion.GetHashCode();
if (this.BrowserUAWithMajorVersion != null)
hashCode = hashCode * 59 + this.BrowserUAWithMajorVersion.GetHashCode();
if (this.BrowserUAWithFullVersion != null)
hashCode = hashCode * 59 + this.BrowserUAWithFullVersion.GetHashCode();
if (this.Architecture != null)
hashCode = hashCode * 59 + this.Architecture.GetHashCode();
if (this.Bitness != null)
hashCode = hashCode * 59 + this.Bitness.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)
{
yield break;
}
}

}
18 changes: 17 additions & 1 deletion Source/Adobe.Target.Delivery/Model/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ protected Context() { }
/// <param name="geo">geo.</param>
/// <param name="timeOffsetInMinutes">Specifies minutes from UTC for specific client.</param>
/// <param name="userAgent">User-Agent should be sent only via this property. HTTP header User-Agent is ignored..</param>
/// <param name="clientHints">clientHints.</param>
/// <param name="beacon">In case beacon &#x3D; true is provided in the request, the server will return a 204 No Content response with no response body. (default to false).</param>
public Context(ChannelType channel = default(ChannelType), MobilePlatform mobilePlatform = default(MobilePlatform), Application application = default(Application), Screen screen = default(Screen), Window window = default(Window), Browser browser = default(Browser), Address address = default(Address), Geo geo = default(Geo), double? timeOffsetInMinutes = default(double?), string userAgent = default(string), bool beacon = false)
public Context(ChannelType channel = default(ChannelType), MobilePlatform mobilePlatform = default(MobilePlatform), Application application = default(Application), Screen screen = default(Screen), Window window = default(Window), Browser browser = default(Browser), Address address = default(Address), Geo geo = default(Geo), double? timeOffsetInMinutes = default(double?), string userAgent = default(string), ClientHints clientHints = default(ClientHints), bool beacon = false)
{
this.Channel = channel;
this.MobilePlatform = mobilePlatform;
Expand All @@ -71,6 +72,7 @@ protected Context() { }
this.Geo = geo;
this.TimeOffsetInMinutes = timeOffsetInMinutes;
this.UserAgent = userAgent;
this.ClientHints = clientHints;
this.Beacon = beacon;
}

Expand Down Expand Up @@ -130,6 +132,12 @@ protected Context() { }
[DataMember(Name = "userAgent", EmitDefaultValue = false)]
public string UserAgent { get; set; }

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

/// <summary>
/// In case beacon &#x3D; true is provided in the request, the server will return a 204 No Content response with no response body.
/// </summary>
Expand All @@ -155,6 +163,7 @@ public override string ToString()
sb.Append(" Geo: ").Append(Geo).Append("\n");
sb.Append(" TimeOffsetInMinutes: ").Append(TimeOffsetInMinutes).Append("\n");
sb.Append(" UserAgent: ").Append(UserAgent).Append("\n");
sb.Append(" ClientHints: ").Append(ClientHints).Append("\n");
sb.Append(" Beacon: ").Append(Beacon).Append("\n");
sb.Append("}\n");
return sb.ToString();
Expand Down Expand Up @@ -238,6 +247,11 @@ public bool Equals(Context input)
(this.UserAgent != null &&
this.UserAgent.Equals(input.UserAgent))
) &&
(
this.ClientHints == input.ClientHints ||
(this.ClientHints != null &&
this.ClientHints.Equals(input.ClientHints))
) &&
(
this.Beacon == input.Beacon ||
this.Beacon.Equals(input.Beacon)
Expand Down Expand Up @@ -271,6 +285,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.TimeOffsetInMinutes.GetHashCode();
if (this.UserAgent != null)
hashCode = hashCode * 59 + this.UserAgent.GetHashCode();
if (this.ClientHints != null)
hashCode = hashCode * 59 + this.ClientHints.GetHashCode();
hashCode = hashCode * 59 + this.Beacon.GetHashCode();
return hashCode;
}
Expand Down
Loading

0 comments on commit 6914059

Please sign in to comment.