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

Fnm/common variable method #875

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -7295,6 +7295,87 @@ Octopus.Client.Model.Migrations
String TaskId { get; set; }
}
}
Octopus.Client.Model.TenantVariables
{
class CommonVariableScope
{
.ctor(Octopus.Client.Model.ReferenceCollection)
Octopus.Client.Model.ReferenceCollection EnvironmentIds { get; set; }
}
class GetCommonVariablesByTenantIdRequest
{
.ctor(String, String)
String SpaceId { get; set; }
String TenantId { get; set; }
}
class GetCommonVariablesByTenantIdResponse
{
.ctor(String, Octopus.Client.Model.TenantVariables.TenantCommonVariable[])
Octopus.Client.Model.TenantVariables.TenantCommonVariable[] CommonVariables { get; set; }
String TenantId { get; set; }
}
class GetProjectVariablesByTenantIdRequest
{
.ctor(String, String)
String SpaceId { get; set; }
String TenantId { get; set; }
}
class GetProjectVariablesByTenantIdResponse
{
.ctor(String, Octopus.Client.Model.TenantVariables.TenantProjectVariable[])
Octopus.Client.Model.TenantVariables.TenantProjectVariable[] ProjectVariables { get; set; }
String TenantId { get; set; }
}
class ModifyCommonVariablesByTenantIdCommand
{
.ctor(String, String, Octopus.Client.Model.TenantVariables.TenantCommonVariable[])
String SpaceId { get; set; }
String TenantId { get; set; }
Octopus.Client.Model.TenantVariables.TenantCommonVariable[] Variables { get; set; }
}
class ModifyCommonVariablesByTenantIdResponse
{
.ctor(String, Octopus.Client.Model.TenantVariables.TenantCommonVariable[])
Octopus.Client.Model.TenantVariables.TenantCommonVariable[] CommonVariables { get; set; }
String TenantId { get; set; }
}
class ModifyProjectVariablesByTenantIdCommand
{
.ctor(String, String, Octopus.Client.Model.TenantVariables.TenantProjectVariable[])
String SpaceId { get; set; }
String TenantId { get; set; }
Octopus.Client.Model.TenantVariables.TenantProjectVariable[] Variables { get; set; }
}
class ModifyProjectVariablesByTenantIdResponse
{
.ctor(String, Octopus.Client.Model.TenantVariables.TenantProjectVariable[])
Octopus.Client.Model.TenantVariables.TenantProjectVariable[] ProjectVariables { get; set; }
String TenantId { get; set; }
}
class ProjectVariableScope
{
.ctor(Octopus.Client.Model.ReferenceCollection)
Octopus.Client.Model.ReferenceCollection EnvironmentIds { get; set; }
}
class TenantCommonVariable
{
.ctor(String, String, Octopus.Client.Model.PropertyValueResource, Octopus.Client.Model.TenantVariables.CommonVariableScope)
String Id { get; set; }
String LibraryVariableSetId { get; set; }
Octopus.Client.Model.TenantVariables.CommonVariableScope Scope { get; set; }
String TemplateId { get; set; }
Octopus.Client.Model.PropertyValueResource Value { get; set; }
}
class TenantProjectVariable
{
.ctor(String, String, Octopus.Client.Model.PropertyValueResource, Octopus.Client.Model.TenantVariables.ProjectVariableScope)
String Id { get; set; }
String ProjectId { get; set; }
Octopus.Client.Model.TenantVariables.ProjectVariableScope Scope { get; set; }
String TemplateId { get; set; }
Octopus.Client.Model.PropertyValueResource Value { get; set; }
}
}
Octopus.Client.Model.Triggers
{
class ArcFeedFilterResource
Expand Down Expand Up @@ -8434,7 +8515,11 @@ Octopus.Client.Repositories
interface ITenantVariablesRepository
Octopus.Client.Repositories.IGetAll<TenantVariableResource>
{
Octopus.Client.Model.TenantVariables.GetCommonVariablesByTenantIdResponse Get(Octopus.Client.Model.TenantVariables.GetCommonVariablesByTenantIdRequest)
Octopus.Client.Model.TenantVariables.GetProjectVariablesByTenantIdResponse Get(Octopus.Client.Model.TenantVariables.GetProjectVariablesByTenantIdRequest)
List<TenantVariableResource> GetAll(Octopus.Client.Model.ProjectResource)
Octopus.Client.Model.TenantVariables.ModifyCommonVariablesByTenantIdResponse Modify(Octopus.Client.Model.TenantVariables.ModifyCommonVariablesByTenantIdCommand)
Octopus.Client.Model.TenantVariables.ModifyProjectVariablesByTenantIdResponse Modify(Octopus.Client.Model.TenantVariables.ModifyProjectVariablesByTenantIdCommand)
}
interface IUpgradeConfigurationRepository
Octopus.Client.Repositories.IGet<UpgradeConfigurationResource>
Expand Down Expand Up @@ -9293,7 +9378,11 @@ Octopus.Client.Repositories.Async
interface ITenantVariablesRepository
Octopus.Client.Repositories.Async.IGetAll<TenantVariableResource>
{
Task<GetCommonVariablesByTenantIdResponse> Get(Octopus.Client.Model.TenantVariables.GetCommonVariablesByTenantIdRequest, CancellationToken)
Task<GetProjectVariablesByTenantIdResponse> Get(Octopus.Client.Model.TenantVariables.GetProjectVariablesByTenantIdRequest, CancellationToken)
Task<List<TenantVariableResource>> GetAll(Octopus.Client.Model.ProjectResource)
Task<ModifyCommonVariablesByTenantIdResponse> Modify(Octopus.Client.Model.TenantVariables.ModifyCommonVariablesByTenantIdCommand, CancellationToken)
Task<ModifyProjectVariablesByTenantIdResponse> Modify(Octopus.Client.Model.TenantVariables.ModifyProjectVariablesByTenantIdCommand, CancellationToken)
}
interface IUpgradeConfigurationRepository
Octopus.Client.Repositories.Async.IGet<UpgradeConfigurationResource>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7319,6 +7319,87 @@ Octopus.Client.Model.Migrations
String TaskId { get; set; }
}
}
Octopus.Client.Model.TenantVariables
{
class CommonVariableScope
{
.ctor(Octopus.Client.Model.ReferenceCollection)
Octopus.Client.Model.ReferenceCollection EnvironmentIds { get; set; }
}
class GetCommonVariablesByTenantIdRequest
{
.ctor(String, String)
String SpaceId { get; set; }
String TenantId { get; set; }
}
class GetCommonVariablesByTenantIdResponse
{
.ctor(String, Octopus.Client.Model.TenantVariables.TenantCommonVariable[])
Octopus.Client.Model.TenantVariables.TenantCommonVariable[] CommonVariables { get; set; }
String TenantId { get; set; }
}
class GetProjectVariablesByTenantIdRequest
{
.ctor(String, String)
String SpaceId { get; set; }
String TenantId { get; set; }
}
class GetProjectVariablesByTenantIdResponse
{
.ctor(String, Octopus.Client.Model.TenantVariables.TenantProjectVariable[])
Octopus.Client.Model.TenantVariables.TenantProjectVariable[] ProjectVariables { get; set; }
String TenantId { get; set; }
}
class ModifyCommonVariablesByTenantIdCommand
{
.ctor(String, String, Octopus.Client.Model.TenantVariables.TenantCommonVariable[])
String SpaceId { get; set; }
String TenantId { get; set; }
Octopus.Client.Model.TenantVariables.TenantCommonVariable[] Variables { get; set; }
}
class ModifyCommonVariablesByTenantIdResponse
{
.ctor(String, Octopus.Client.Model.TenantVariables.TenantCommonVariable[])
Octopus.Client.Model.TenantVariables.TenantCommonVariable[] CommonVariables { get; set; }
String TenantId { get; set; }
}
class ModifyProjectVariablesByTenantIdCommand
{
.ctor(String, String, Octopus.Client.Model.TenantVariables.TenantProjectVariable[])
String SpaceId { get; set; }
String TenantId { get; set; }
Octopus.Client.Model.TenantVariables.TenantProjectVariable[] Variables { get; set; }
}
class ModifyProjectVariablesByTenantIdResponse
{
.ctor(String, Octopus.Client.Model.TenantVariables.TenantProjectVariable[])
Octopus.Client.Model.TenantVariables.TenantProjectVariable[] ProjectVariables { get; set; }
String TenantId { get; set; }
}
class ProjectVariableScope
{
.ctor(Octopus.Client.Model.ReferenceCollection)
Octopus.Client.Model.ReferenceCollection EnvironmentIds { get; set; }
}
class TenantCommonVariable
{
.ctor(String, String, Octopus.Client.Model.PropertyValueResource, Octopus.Client.Model.TenantVariables.CommonVariableScope)
String Id { get; set; }
String LibraryVariableSetId { get; set; }
Octopus.Client.Model.TenantVariables.CommonVariableScope Scope { get; set; }
String TemplateId { get; set; }
Octopus.Client.Model.PropertyValueResource Value { get; set; }
}
class TenantProjectVariable
{
.ctor(String, String, Octopus.Client.Model.PropertyValueResource, Octopus.Client.Model.TenantVariables.ProjectVariableScope)
String Id { get; set; }
String ProjectId { get; set; }
Octopus.Client.Model.TenantVariables.ProjectVariableScope Scope { get; set; }
String TemplateId { get; set; }
Octopus.Client.Model.PropertyValueResource Value { get; set; }
}
}
Octopus.Client.Model.Triggers
{
class ArcFeedFilterResource
Expand Down Expand Up @@ -8459,7 +8540,11 @@ Octopus.Client.Repositories
interface ITenantVariablesRepository
Octopus.Client.Repositories.IGetAll<TenantVariableResource>
{
Octopus.Client.Model.TenantVariables.GetCommonVariablesByTenantIdResponse Get(Octopus.Client.Model.TenantVariables.GetCommonVariablesByTenantIdRequest)
Octopus.Client.Model.TenantVariables.GetProjectVariablesByTenantIdResponse Get(Octopus.Client.Model.TenantVariables.GetProjectVariablesByTenantIdRequest)
List<TenantVariableResource> GetAll(Octopus.Client.Model.ProjectResource)
Octopus.Client.Model.TenantVariables.ModifyCommonVariablesByTenantIdResponse Modify(Octopus.Client.Model.TenantVariables.ModifyCommonVariablesByTenantIdCommand)
Octopus.Client.Model.TenantVariables.ModifyProjectVariablesByTenantIdResponse Modify(Octopus.Client.Model.TenantVariables.ModifyProjectVariablesByTenantIdCommand)
}
interface IUpgradeConfigurationRepository
Octopus.Client.Repositories.IGet<UpgradeConfigurationResource>
Expand Down Expand Up @@ -9318,7 +9403,11 @@ Octopus.Client.Repositories.Async
interface ITenantVariablesRepository
Octopus.Client.Repositories.Async.IGetAll<TenantVariableResource>
{
Task<GetCommonVariablesByTenantIdResponse> Get(Octopus.Client.Model.TenantVariables.GetCommonVariablesByTenantIdRequest, CancellationToken)
Task<GetProjectVariablesByTenantIdResponse> Get(Octopus.Client.Model.TenantVariables.GetProjectVariablesByTenantIdRequest, CancellationToken)
Task<List<TenantVariableResource>> GetAll(Octopus.Client.Model.ProjectResource)
Task<ModifyCommonVariablesByTenantIdResponse> Modify(Octopus.Client.Model.TenantVariables.ModifyCommonVariablesByTenantIdCommand, CancellationToken)
Task<ModifyProjectVariablesByTenantIdResponse> Modify(Octopus.Client.Model.TenantVariables.ModifyProjectVariablesByTenantIdCommand, CancellationToken)
}
interface IUpgradeConfigurationRepository
Octopus.Client.Repositories.Async.IGet<UpgradeConfigurationResource>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Octopus.Client.Model.TenantVariables;

public class GetCommonVariablesByTenantIdRequest(string tenantId, string spaceId)
{
public string TenantId { get; set; } = tenantId;

public string SpaceId { get; set; } = spaceId;
}

public class GetCommonVariablesByTenantIdResponse(string tenantId, TenantCommonVariable[] commonVariables)
{
public string TenantId { get; set; } = tenantId;

public TenantCommonVariable[] CommonVariables { get; set; } = commonVariables;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Octopus.Client.Model.TenantVariables;

public class GetProjectVariablesByTenantIdRequest(string tenantId, string spaceId)
{
public string TenantId { get; set; } = tenantId;

public string SpaceId { get; set; } = spaceId;
}

public class GetProjectVariablesByTenantIdResponse(string tenantId, TenantProjectVariable[] projectVariables)
{
public string TenantId { get; set; } = tenantId;

public TenantProjectVariable[] ProjectVariables { get; set; } = projectVariables;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
namespace Octopus.Client.Model.TenantVariables;

public class ModifyCommonVariablesByTenantIdCommand(string tenantId, string spaceId, TenantCommonVariable[] variables)
{
public string TenantId { get; set; } = tenantId;

public string SpaceId { get; set; } = spaceId;

public TenantCommonVariable[] Variables { get; set; } = variables;
}


public class TenantCommonVariable(string libraryVariableSetId, string templateId, PropertyValueResource value, CommonVariableScope scope)
{
public string Id { get; set; } = string.Empty;

public string LibraryVariableSetId { get; set; } = libraryVariableSetId;

public string TemplateId { get; set; } = templateId;

public PropertyValueResource Value { get; set; } = value;

public CommonVariableScope Scope { get; set; } = scope;
}

public class CommonVariableScope(ReferenceCollection environmentIds)
{
public ReferenceCollection EnvironmentIds { get; set; } = environmentIds;
}

public class ModifyCommonVariablesByTenantIdResponse(string tenantId, TenantCommonVariable[] commonVariables)
{
public string TenantId { get; set; } = tenantId;

public TenantCommonVariable[] CommonVariables { get; set; } = commonVariables;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
namespace Octopus.Client.Model.TenantVariables;

public class ModifyProjectVariablesByTenantIdCommand(string tenantId, string spaceId, TenantProjectVariable[] variables)
{
public string TenantId { get; set; } = tenantId;

public string SpaceId { get; set; } = spaceId;

public TenantProjectVariable[] Variables { get; set; } = variables;
}

public class TenantProjectVariable(
string projectId,
string templateId,
PropertyValueResource value,
ProjectVariableScope scope)
{
public string Id { get; set; } = string.Empty;

public string ProjectId { get; set; } = projectId;

public string TemplateId { get; set; } = templateId;

public PropertyValueResource Value { get; set; } = value;

public ProjectVariableScope Scope { get; set; } = scope;
}

public class ProjectVariableScope(ReferenceCollection environmentIds)
{
public ReferenceCollection EnvironmentIds { get; set; } = environmentIds;
}

public class ModifyProjectVariablesByTenantIdResponse(string tenantId, TenantProjectVariable[] projectVariables)
{
public string TenantId { get; set; } = tenantId;

public TenantProjectVariable[] ProjectVariables { get; set; } = projectVariables;
}

Loading
Loading