Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PP9-13675 regenerated contracts (crop) #569

Merged
merged 3 commits into from Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
240 changes: 219 additions & 21 deletions src/Picturepark.SDK.V1.CloudManager/Generated/Contracts.Generated.cs
Expand Up @@ -1264,6 +1264,7 @@ public static PictureparkBusinessException FromJson(string data)
[JsonInheritanceAttribute("LanguageCodeNotExistingException", typeof(LanguageCodeNotExistingException))]
[JsonInheritanceAttribute("RenderingException", typeof(RenderingException))]
[JsonInheritanceAttribute("FormatNotApplicableForRenderingException", typeof(FormatNotApplicableForRenderingException))]
[JsonInheritanceAttribute("FocalPointCropSizeMissingException", typeof(FocalPointCropSizeMissingException))]
[JsonInheritanceAttribute("DocumentVersionNotFoundException", typeof(DocumentVersionNotFoundException))]
[JsonInheritanceAttribute("DefaultChannelDeleteException", typeof(DefaultChannelDeleteException))]
[JsonInheritanceAttribute("ChannelsNotFoundException", typeof(ChannelsNotFoundException))]
Expand Down Expand Up @@ -2282,6 +2283,28 @@ public enum RenderingCategory

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
[Newtonsoft.Json.JsonObjectAttribute]
public partial class FocalPointCropSizeMissingException : PictureparkValidationException
{
[Newtonsoft.Json.JsonProperty("contentId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ContentId { get; set; }

[Newtonsoft.Json.JsonProperty("focalPointId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string FocalPointId { get; set; }

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static FocalPointCropSizeMissingException FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<FocalPointCropSizeMissingException>(data);
}

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
[Newtonsoft.Json.JsonObjectAttribute]
public partial class ServiceProviderDeleteException : PictureparkException
Expand Down Expand Up @@ -11775,6 +11798,7 @@ public enum ResizeMode

[Newtonsoft.Json.JsonConverter(typeof(JsonInheritanceConverter), "kind")]
[JsonInheritanceAttribute("AlphaHandlingAction", typeof(AlphaHandlingAction))]
[JsonInheritanceAttribute("CropActionGeneric", typeof(CropActionGeneric))]
[JsonInheritanceAttribute("CropAction", typeof(CropAction))]
[JsonInheritanceAttribute("GravityBasedCropAction", typeof(GravityBasedCropAction))]
[JsonInheritanceAttribute("RelativeCropAction", typeof(RelativeCropAction))]
Expand Down Expand Up @@ -11836,9 +11860,52 @@ public enum AlphaHandling

}

/// <summary>An ImageAction that allows cropping an image.</summary>
/// <summary>Parameters for cropping actions.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class CropActionGeneric : ImageActionBase
{
/// <summary>Defines position of cropping rectangle.</summary>
[Newtonsoft.Json.JsonProperty("position", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public CropPositionBase Position { get; set; }

/// <summary>Defines size of cropping rectangle.</summary>
[Newtonsoft.Json.JsonProperty("size", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public CropSizeBase Size { get; set; }

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static CropActionGeneric FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropActionGeneric>(data);
}

}

/// <summary>Defines position of cropping rectangle.</summary>
[Newtonsoft.Json.JsonConverter(typeof(JsonInheritanceConverter), "kind")]
[JsonInheritanceAttribute("CropOriginAbsolute", typeof(CropOriginAbsolute))]
[JsonInheritanceAttribute("CropCenterRelative", typeof(CropCenterRelative))]
[JsonInheritanceAttribute("CropPositionGravity", typeof(CropPositionGravity))]
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public abstract partial class CropPositionBase
{
public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static CropPositionBase FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropPositionBase>(data);
}

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class CropAction : CropActionBase
public partial class CropOriginAbsolute : CropPositionBase
{
/// <summary>X-Coordinate of top left point of the cropping rectangle.</summary>
[Newtonsoft.Json.JsonProperty("x", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
Expand All @@ -11853,40 +11920,40 @@ public string ToJson()
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static CropAction FromJson(string data)
public static CropOriginAbsolute FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropAction>(data);
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropOriginAbsolute>(data);
}

}

/// <summary>Base parameters for cropping actions.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public abstract partial class CropActionBase : ImageActionBase
public partial class CropCenterRelative : CropPositionBase
{
/// <summary>Width of the cropping rectangle.</summary>
[Newtonsoft.Json.JsonProperty("width", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int Width { get; set; }
/// <summary>Relative horizontal position of center for crop. 0.5 designates the center of the image.</summary>
[Newtonsoft.Json.JsonProperty("x", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Range(0.0D, 1.0D)]
public float X { get; set; }

/// <summary>Height of the cropping rectangle.</summary>
[Newtonsoft.Json.JsonProperty("height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int Height { get; set; }
/// <summary>Relative vertical position of center for crop. 0.5 designates the center of the image.</summary>
[Newtonsoft.Json.JsonProperty("y", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Range(0.0D, 1.0D)]
public float Y { get; set; }

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static CropActionBase FromJson(string data)
public static CropCenterRelative FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropActionBase>(data);
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropCenterRelative>(data);
}

}

/// <summary>An ImageAction that allows cropping an image, weighing the cropping rectangle on a gravity.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class GravityBasedCropAction : CropActionBase
public partial class CropPositionGravity : CropPositionBase
{
/// <summary>Gravity of the cropping rectangle.</summary>
[Newtonsoft.Json.JsonProperty("gravity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
Expand All @@ -11898,9 +11965,9 @@ public string ToJson()
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static GravityBasedCropAction FromJson(string data)
public static CropPositionGravity FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<GravityBasedCropAction>(data);
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropPositionGravity>(data);
}

}
Expand Down Expand Up @@ -11932,17 +11999,148 @@ public enum CropGravity
[System.Runtime.Serialization.EnumMember(Value = @"West")]
West = 7,

[System.Runtime.Serialization.EnumMember(Value = @"Center")]
Center = 8,

}

/// <summary>Defines size of cropping rectangle.</summary>
[Newtonsoft.Json.JsonConverter(typeof(JsonInheritanceConverter), "kind")]
[JsonInheritanceAttribute("CropSizeAbsolute", typeof(CropSizeAbsolute))]
[JsonInheritanceAttribute("CropSizeRelative", typeof(CropSizeRelative))]
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public abstract partial class CropSizeBase
{
public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static CropSizeBase FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropSizeBase>(data);
}

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class CropSizeAbsolute : CropSizeBase
{
/// <summary>Width of the cropping rectangle.</summary>
[Newtonsoft.Json.JsonProperty("width", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int Width { get; set; }

/// <summary>Height of the cropping rectangle.</summary>
[Newtonsoft.Json.JsonProperty("height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int Height { get; set; }

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static CropSizeAbsolute FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropSizeAbsolute>(data);
}

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class CropSizeRelative : CropSizeBase
{
/// <summary>Width of the cropping rectangle in range [0, 1].</summary>
[Newtonsoft.Json.JsonProperty("width", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Range(0.0D, 1.0D)]
public float Width { get; set; }

/// <summary>Height of the cropping rectangle in range [0, 1].</summary>
[Newtonsoft.Json.JsonProperty("height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Range(0.0D, 1.0D)]
public float Height { get; set; }

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static CropSizeRelative FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropSizeRelative>(data);
}

}

/// <summary>An ImageAction that allows cropping an image.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class CropAction : CropActionAbsoluteSizeBase
{
[Newtonsoft.Json.JsonProperty("x", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int X { get; set; }

[Newtonsoft.Json.JsonProperty("y", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int Y { get; set; }

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static CropAction FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropAction>(data);
}

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public abstract partial class CropActionAbsoluteSizeBase : CropActionGeneric
{
[Newtonsoft.Json.JsonProperty("height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int Height { get; set; }

[Newtonsoft.Json.JsonProperty("width", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int Width { get; set; }

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static CropActionAbsoluteSizeBase FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<CropActionAbsoluteSizeBase>(data);
}

}

/// <summary>An ImageAction that allows cropping an image, weighing the cropping rectangle on a gravity.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class GravityBasedCropAction : CropActionAbsoluteSizeBase
{
[Newtonsoft.Json.JsonProperty("gravity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public CropGravity Gravity { get; set; }

public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}

public static GravityBasedCropAction FromJson(string data)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<GravityBasedCropAction>(data);
}

}

/// <summary>An ImageAction that allows cropping an image, positioning the cropping rectangle relative to the width/height of the image.</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.23.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class RelativeCropAction : CropActionBase
public partial class RelativeCropAction : CropActionAbsoluteSizeBase
{
/// <summary>Relative position of origin point from the left of the image. 0.5 designates the center of the image.</summary>
[Newtonsoft.Json.JsonProperty("x", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public float X { get; set; }

/// <summary>Relative position of origin point from the top of the image. 0.5 designates the center of the image.</summary>
[Newtonsoft.Json.JsonProperty("y", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public float Y { get; set; }

Expand Down