Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Organization" /> class.
        /// </summary>
        /// <param name="id">The org ID (required).</param>
        /// <param name="owner">The account the organization represents (required).</param>
        /// <param name="role">The role the user has within the organization.</param>
        /// <param name="memberCount">The number of members that are part of this org (default to 0).</param>
        /// <param name="teamCount">The number of teams that are part of this org (default to 0).</param>
        /// <param name="accountName">The unique name of the org in small case without spaces.</param>
        /// <param name="name">The display name for this org.</param>
        /// <param name="pictureUrl">URL to the picture associated with this org.</param>
        /// <param name="contactEmail">The contact email for the Organization.</param>
        /// <param name="description">A description of the org.</param>
        public Organization
        (
            string id, AccountPublic owner,                                                                                                                                                                                            // Required parameters
            string accountName = default, string name = default, string pictureUrl = default, string contactEmail = default, string description = default, OrganizationRoleEnum role = default, int memberCount = 0, int teamCount = 0 // Optional parameters
        ) : base(accountName: accountName, name: name, pictureUrl: pictureUrl, contactEmail: contactEmail, description: description)                                                                                                   // BaseClass
        {
            // to ensure "id" is required (not null)
            this.Id = id ?? throw new ArgumentNullException("id is a required property for Organization and cannot be null");
            // to ensure "owner" is required (not null)
            this.Owner       = owner ?? throw new ArgumentNullException("owner is a required property for Organization and cannot be null");
            this.Role        = role;
            this.MemberCount = memberCount;
            this.TeamCount   = teamCount;

            // Set non-required readonly properties with defaultValue
            this.Type = "Organization";
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Run" /> class.
        /// </summary>
        /// <param name="id">The unique ID for this run (required).</param>
        /// <param name="author">author.</param>
        /// <param name="owner">owner.</param>
        /// <param name="recipe">The recipe used to generate this .</param>
        /// <param name="generation">The generation of this run.</param>
        /// <param name="status">The status of the run.</param>
        /// <param name="meta">Extra metadata about the run.</param>
        public Run
        (
            string id,                                                                                                                                                                       // Required parameters
            AccountPublic author = default, AccountPublic owner = default, RecipeInterface recipe = default, double generation = default, RunStatus status = default, RunMeta meta = default // Optional parameters
        ) : base()                                                                                                                                                                           // BaseClass
        {
            // to ensure "id" is required (not null)
            this.Id         = id ?? throw new ArgumentNullException("id is a required property for Run and cannot be null");
            this.Author     = author;
            this.Owner      = owner;
            this.Recipe     = recipe;
            this.Generation = generation;
            this.Status     = status;
            this.Meta       = meta;

            // Set non-required readonly properties with defaultValue
            this.Type = "Run";
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Repository" /> class.
        /// </summary>
        /// <param name="id">The recipe unique ID (required).</param>
        /// <param name="latestTag">The latest package version to be indexed (required).</param>
        /// <param name="owner">The owner of the repository (required).</param>
        /// <param name="permissions">The permissions the user making the API call has on the resource.</param>
        /// <param name="slug">The repository slug.</param>
        /// <param name="_public">Whether or not a repository is publicly viewable.</param>
        /// <param name="keywords">A list of keywords to index the repository by.</param>
        /// <param name="description">A description of the repository.</param>
        /// <param name="icon">An icon to represent this repository.</param>
        /// <param name="name">The name of the repository (required).</param>
        public Repository
        (
            string name, string id, string latestTag, AccountPublic owner,                                                                                                                        // Required parameters
            bool _public = default, List <string> keywords = default, string description = default, string icon = default, RepositoryUserPermissions permissions = default, string slug = default // Optional parameters
        ) : base(_public: _public, keywords: keywords, description: description, icon: icon, name: name)                                                                                          // BaseClass
        {
            // to ensure "id" is required (not null)
            this.Id = id ?? throw new ArgumentNullException("id is a required property for Repository and cannot be null");
            // to ensure "latestTag" is required (not null)
            this.LatestTag = latestTag ?? throw new ArgumentNullException("latestTag is a required property for Repository and cannot be null");
            // to ensure "owner" is required (not null)
            this.Owner       = owner ?? throw new ArgumentNullException("owner is a required property for Repository and cannot be null");
            this.Permissions = permissions;
            this.Slug        = slug;

            // Set non-required readonly properties with defaultValue
            this.Type = "Repository";
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CloudJob" /> class.
        /// </summary>
        /// <param name="id">The unique ID for this run (required).</param>
        /// <param name="spec">The job specification (required).</param>
        /// <param name="author">author.</param>
        /// <param name="owner">owner.</param>
        /// <param name="recipe">The recipe used to generate this .</param>
        /// <param name="status">The status of the job.</param>
        public CloudJob
        (
            string id, Job spec,                                                                                                        // Required parameters
            AccountPublic author = default, AccountPublic owner = default, RecipeInterface recipe = default, JobStatus status = default // Optional parameters
        ) : base()                                                                                                                      // BaseClass
        {
            // to ensure "id" is required (not null)
            this.Id = id ?? throw new ArgumentNullException("id is a required property for CloudJob and cannot be null");
            // to ensure "spec" is required (not null)
            this.Spec   = spec ?? throw new ArgumentNullException("spec is a required property for CloudJob and cannot be null");
            this.Author = author;
            this.Owner  = owner;
            this.Recipe = recipe;
            this.Status = status;

            // Set non-required readonly properties with defaultValue
            this.Type = "CloudJob";
        }
Exemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Project" /> class.
        /// </summary>
        /// <param name="id">The project ID (required).</param>
        /// <param name="owner">The project owner (required).</param>
        /// <param name="permissions">permissions (required).</param>
        /// <param name="slug">The project name in slug format (required).</param>
        /// <param name="usage">The resource consumption of this project.</param>
        /// <param name="name">The name of the project. Must be unique to a given owner (required).</param>
        /// <param name="description">A description of the project (default to &quot;&quot;).</param>
        /// <param name="_public">Whether or not a project is publicly viewable (default to true).</param>
        public Project
        (
            string name, string id, AccountPublic owner, UserPermission permissions, string slug, // Required parameters
            string description = "", bool _public = true, Usage usage = default                   // Optional parameters
        ) : base(name: name, description: description, _public: _public)                          // BaseClass
        {
            // to ensure "id" is required (not null)
            this.Id = id ?? throw new ArgumentNullException("id is a required property for Project and cannot be null");
            // to ensure "owner" is required (not null)
            this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for Project and cannot be null");
            // to ensure "permissions" is required (not null)
            this.Permissions = permissions ?? throw new ArgumentNullException("permissions is a required property for Project and cannot be null");
            // to ensure "slug" is required (not null)
            this.Slug  = slug ?? throw new ArgumentNullException("slug is a required property for Project and cannot be null");
            this.Usage = usage;

            // Set non-required readonly properties with defaultValue
            this.Type = "Project";
        }
Exemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Quota" /> class.
        /// </summary>
        /// <param name="owner">The quota owner (required).</param>
        /// <param name="id">The unique ID for this Quota.</param>
        /// <param name="periodStart">The start of the quota usage tracking period.</param>
        /// <param name="limit">The maximum amount of a resource the account can consume.</param>
        /// <param name="usage">The current amount of a resource allocated to the account linked to the subscription.</param>
        /// <param name="resets">Whether consumption is reset to 0 every billing period (default to false).</param>
        /// <param name="enforced">Whether the limit triggers a blocking response from the server (default to false).</param>
        /// <param name="exceeded">Whether the resource usage is greater than or equal to the limit (default to false).</param>
        /// <param name="displayName">The human-readable name.</param>
        /// <param name="description">The description.</param>
        /// <param name="unit">The unit in which the usage and limit are measured.</param>
        public Quota
        (
            AccountPublic owner,                                                                                                                                                                                                                                    // Required parameters
            Guid id = default, DateTime periodStart = default, double limit = default, double usage = default, bool resets = false, bool enforced = false, bool exceeded = false, string displayName = default, string description = default, string unit = default // Optional parameters
        ) : base()                                                                                                                                                                                                                                                  // BaseClass
        {
            // to ensure "owner" is required (not null)
            this.Owner       = owner ?? throw new ArgumentNullException("owner is a required property for Quota and cannot be null");
            this.Id          = id;
            this.PeriodStart = periodStart;
            this.Limit       = limit;
            this.Usage       = usage;
            this.Resets      = resets;
            this.Enforced    = enforced;
            this.Exceeded    = exceeded;
            this.DisplayName = displayName;
            this.Description = description;
            this.Unit        = unit;

            // Set non-required readonly properties with defaultValue
        }
Exemplo n.º 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LicensePoolPublic" /> class.
        /// </summary>
        /// <param name="id">The ID of the pool (required).</param>
        /// <param name="licenseId">The ID of the license to which the pool provides access (required).</param>
        /// <param name="owner">The account that owns the license (required).</param>
        /// <param name="permissions">permissions (required).</param>
        /// <param name="product">The pollination product to which this pool provides access (required).</param>
        /// <param name="accessors">The entities that can access the license though the pool.</param>
        /// <param name="description">The description of the pool.</param>
        public LicensePoolPublic
        (
            Guid id, string licenseId, AccountPublic owner, UserPermission permissions, string product, // Required parameters
            List <Accessor> accessors = default, string description = default                           // Optional parameters
        ) : base()                                                                                      // BaseClass
        {
            this.Id = id;
            // to ensure "licenseId" is required (not null)
            this.LicenseId = licenseId ?? throw new ArgumentNullException("licenseId is a required property for LicensePoolPublic and cannot be null");
            // to ensure "owner" is required (not null)
            this.Owner = owner ?? throw new ArgumentNullException("owner is a required property for LicensePoolPublic and cannot be null");
            // to ensure "permissions" is required (not null)
            this.Permissions = permissions ?? throw new ArgumentNullException("permissions is a required property for LicensePoolPublic and cannot be null");
            // to ensure "product" is required (not null)
            this.Product     = product ?? throw new ArgumentNullException("product is a required property for LicensePoolPublic and cannot be null");
            this.Accessors   = accessors;
            this.Description = description;

            // Set non-required readonly properties with defaultValue
            this.Type = "LicensePoolPublic";
        }