C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
SubResourceEndpoint.cs
Go to the documentation of this file.
1using System;
2
3namespace AnalyzeRe.APITypes
4{
8 public abstract class SubResourceEndpoint : IEndpoint
9 {
10 #region Properties
12 public IEndpoint Owner { get; }
13
15 public string RelativePathFromOwner { get; }
16
19 public string Path => $"{Owner.Path}/{RelativePathFromOwner}";
20 #endregion Properties
21
30
34 public void ValidateOwnerHasId()
35 {
37 API.ValidateExistingResource(asResource);
39 subresource.ValidateOwnerHasId();
40 }
41 }
42}
Describes a collection of resources which can be listed.
Describes an additional sub-resource available off a resource which is not actually a property of tha...
void ValidateOwnerHasId()
Verifies the owner exists and has been POSTed, ensuring that it is safe to invoke actions on this Sub...
IEndpoint Owner
The endpoint off of which this sub-endpoint exists.
string Path
The relative path to this endpoint from the root server URL.
SubResourceEndpoint(IEndpoint owner, string relativePath)
Defines a new sub-resource or endpoint off the current resource.
string RelativePathFromOwner
The relative path to this endpoint from its owner.
API methods / requests made available to the user.
Describes an endpoint on the server that can be interacted with. Inheriting from this interface means...
Definition IEndpoint.cs:10
Interface for Base class used by all resources.