Skip to content

Commit

Permalink
move tagging related classes into a namespace. (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
BigUstad authored May 19, 2021
1 parent 77bd34b commit 54a1709
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 17 deletions.
8 changes: 4 additions & 4 deletions Minio.Examples/Cases/CopyObjectReplaceTags.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2017-2021 MinIO, Inc.
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2021 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,8 @@

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Threading.Tasks;
using Minio.DataModel;
using Minio.DataModel.Tags;

namespace Minio.Examples.Cases
{
Expand All @@ -38,13 +37,14 @@ public async static Task Run(MinioClient minio,
{
{ "Test-TagKey", "Test-TagValue" },
};
Tagging tagObj = Tagging.GetObjectTags(tags);
CopySourceObjectArgs cpSrcArgs = new CopySourceObjectArgs()
.WithBucket(fromBucketName)
.WithObject(fromObjectName);
CopyObjectArgs args = new CopyObjectArgs()
.WithBucket(destBucketName)
.WithObject(destObjectName)
.WithTagging(Tagging.GetObjectTags(tags))
.WithTagging(tagObj)
.WithReplaceTagsDirective(true)
.WithCopyObjectSource(cpSrcArgs);
await minio.CopyObjectAsync(args).ConfigureAwait(false);
Expand Down
4 changes: 3 additions & 1 deletion Minio.Examples/Cases/GetBucketTags.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020, 2021 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,8 @@
using System;
using System.Threading.Tasks;

using Minio.DataModel.Tags;

namespace Minio.Examples.Cases
{
public class GetBucketTags
Expand Down
4 changes: 3 additions & 1 deletion Minio.Examples/Cases/GetObjectTags.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020, 2021 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,8 @@
using System;
using System.Threading.Tasks;

using Minio.DataModel.Tags;

namespace Minio.Examples.Cases
{
public class GetObjectTags
Expand Down
3 changes: 2 additions & 1 deletion Minio.Examples/Cases/PutObjectWithTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
* limitations under the License.
*/

using Minio.DataModel;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

using Minio.DataModel.Tags;

namespace Minio.Examples.Cases
{
class PutObjectWithTags
Expand Down
2 changes: 1 addition & 1 deletion Minio.Examples/Cases/SetBucketReplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;

using Minio.DataModel;
using Minio.DataModel.Tags;
using Minio.DataModel.Replication;

namespace Minio.Examples.Cases
Expand Down
4 changes: 2 additions & 2 deletions Minio.Examples/Cases/SetBucketTags.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020, 2021 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Minio.DataModel;
using Minio.DataModel.Tags;

namespace Minio.Examples.Cases
{
Expand Down
4 changes: 2 additions & 2 deletions Minio.Examples/Cases/SetObjectTags.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
* MinIO .NET Library for Amazon S3 Compatible Cloud Storage, (C) 2020, 2021 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Minio.DataModel;
using Minio.DataModel.Tags;

namespace Minio.Examples.Cases
{
Expand Down
2 changes: 1 addition & 1 deletion Minio.Functional.Tests/FunctionalTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Minio.DataModel;
using Minio.DataModel.ILM;
using Minio.DataModel.Tags;
using Minio.DataModel.ObjectLock;
using Minio.Exceptions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Cryptography;
Expand Down
1 change: 1 addition & 0 deletions Minio/ApiEndpoints/BucketOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

using Minio.DataModel;
using Minio.DataModel.Tags;
using Minio.Exceptions;
using RestSharp;
using System;
Expand Down
1 change: 1 addition & 0 deletions Minio/ApiEndpoints/IBucketOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using Minio.DataModel;
using Minio.DataModel.ILM;
using Minio.DataModel.Replication;
using Minio.DataModel.Tags;
using Minio.DataModel.ObjectLock;
using Minio.Exceptions;

Expand Down
1 change: 1 addition & 0 deletions Minio/ApiEndpoints/IObjectOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using System.Threading.Tasks;

using Minio.DataModel;
using Minio.DataModel.Tags;
using Minio.DataModel.ObjectLock;
using Minio.Exceptions;

Expand Down
1 change: 1 addition & 0 deletions Minio/ApiEndpoints/ObjectOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using System.Xml.Serialization;

using Minio.DataModel;
using Minio.DataModel.Tags;
using Minio.Exceptions;
using Minio.Helper;
using Minio.DataModel.ObjectLock;
Expand Down
1 change: 1 addition & 0 deletions Minio/DataModel/BucketOperationsArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Minio.DataModel;
using Minio.DataModel.ILM;
using Minio.DataModel.Replication;
using Minio.DataModel.Tags;
using Minio.DataModel.ObjectLock;
using Minio.Exceptions;
using RestSharp;
Expand Down
1 change: 1 addition & 0 deletions Minio/DataModel/BucketOperationsReponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Minio.DataModel;
using Minio.DataModel.ILM;
using Minio.DataModel.Replication;
using Minio.DataModel.Tags;
using Minio.DataModel.ObjectLock;

using System;
Expand Down
2 changes: 2 additions & 0 deletions Minio/DataModel/ILM/AndOperator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
using System.Collections.Generic;
using System.Xml.Serialization;

using Minio.DataModel.Tags;

/*
* AndOperator is used with Lifecycle RuleFilter to bind the rules together.
* Please refer:
Expand Down
1 change: 1 addition & 0 deletions Minio/DataModel/ILM/RuleFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

using System;
using System.Xml.Serialization;
using Minio.DataModel.Tags;

/*
* RuleFilter class used within LifecycleRule which encapsulates filter information.
Expand Down
1 change: 1 addition & 0 deletions Minio/DataModel/ObjectOperationsArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using System.Linq;

using Minio.DataModel;
using Minio.DataModel.Tags;
using Minio.DataModel.ObjectLock;
using Minio.Exceptions;
using Minio.Helper;
Expand Down
1 change: 1 addition & 0 deletions Minio/DataModel/ObjectOperationsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using System.Xml.Serialization;

using Minio.DataModel;
using Minio.DataModel.Tags;
using Minio.DataModel.ObjectLock;
using RestSharp;

Expand Down
2 changes: 1 addition & 1 deletion Minio/DataModel/ObjectWriteArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

using Minio.DataModel;
using Minio.DataModel.Tags;
using Minio.DataModel.ObjectLock;

namespace Minio
Expand Down
2 changes: 2 additions & 0 deletions Minio/DataModel/Replication/AndOperator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
using System.Collections.Generic;
using System.Xml.Serialization;

using Minio.DataModel.Tags;

/*
* AndOperator class used within RuleFilter of ReplicationRule which is used to specify rule components and is equivalent of a Logical And for two or more predicates.
* Please refer:
Expand Down
2 changes: 2 additions & 0 deletions Minio/DataModel/Replication/RuleFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
using System;
using System.Xml.Serialization;

using Minio.DataModel.Tags;

/*
* RuleFilter class used within ReplicationRule which encapsulates filter information.
* Please refer:
Expand Down
2 changes: 1 addition & 1 deletion Minio/DataModel/Tag.cs → Minio/DataModel/Tags/Tag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using System;
using System.Xml.Serialization;

namespace Minio.DataModel
namespace Minio.DataModel.Tags
{
[Serializable]
[XmlRoot(ElementName = "Tag")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
using System.Collections.Generic;
using System.Xml.Serialization;

namespace Minio.DataModel
namespace Minio.DataModel.Tags
{
[Serializable]
[XmlRoot(ElementName = "TagSet")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using System.Xml;
using System.Xml.Serialization;

namespace Minio.DataModel
namespace Minio.DataModel.Tags
{
[Serializable]
[XmlRoot(ElementName = "Tagging")]
Expand Down

0 comments on commit 54a1709

Please sign in to comment.