diff --git a/DiscoveryJson/storage.v1.json b/DiscoveryJson/storage.v1.json index 3eb659bbfb8..acd40ebcab7 100644 --- a/DiscoveryJson/storage.v1.json +++ b/DiscoveryJson/storage.v1.json @@ -93,7 +93,7 @@ "location": "us-west4" } ], - "etag": "\"3134393437363236373436353839383934323639\"", + "etag": "\"3133343838373034343130353038353234313337\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -3224,6 +3224,98 @@ ], "supportsSubscription": true }, + "move": { + "description": "Moves the source object to the destination object in the same bucket.", + "httpMethod": "POST", + "id": "storage.objects.move", + "parameterOrder": [ + "bucket", + "sourceObject", + "destinationObject" + ], + "parameters": { + "bucket": { + "description": "Name of the bucket in which the object resides.", + "location": "path", + "required": true, + "type": "string" + }, + "destinationObject": { + "description": "Name of the destination object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "location": "path", + "required": true, + "type": "string" + }, + "ifGenerationMatch": { + "description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. `ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.", + "format": "int64", + "location": "query", + "type": "string" + }, + "ifGenerationNotMatch": { + "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.`ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.", + "format": "int64", + "location": "query", + "type": "string" + }, + "ifMetagenerationMatch": { + "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.", + "format": "int64", + "location": "query", + "type": "string" + }, + "ifMetagenerationNotMatch": { + "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.", + "format": "int64", + "location": "query", + "type": "string" + }, + "ifSourceGenerationMatch": { + "description": "Makes the operation conditional on whether the source object's current generation matches the given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.", + "format": "int64", + "location": "query", + "type": "string" + }, + "ifSourceGenerationNotMatch": { + "description": "Makes the operation conditional on whether the source object's current generation does not match the given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.", + "format": "int64", + "location": "query", + "type": "string" + }, + "ifSourceMetagenerationMatch": { + "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.", + "format": "int64", + "location": "query", + "type": "string" + }, + "ifSourceMetagenerationNotMatch": { + "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request.", + "format": "int64", + "location": "query", + "type": "string" + }, + "sourceObject": { + "description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "location": "path", + "required": true, + "type": "string" + }, + "userProject": { + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query", + "type": "string" + } + }, + "path": "b/{bucket}/o/{sourceObject}/moveTo/o/{destinationObject}", + "response": { + "$ref": "Object" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, "patch": { "description": "Patches an object's metadata.", "httpMethod": "PATCH", @@ -4272,7 +4364,7 @@ } } }, - "revision": "20241113", + "revision": "20241206", "rootUrl": "https://storage.googleapis.com/", "schemas": { "AdvanceRelocateBucketOperationRequest": { diff --git a/Src/Generated/Google.Apis.Storage.v1/Google.Apis.Storage.v1.cs b/Src/Generated/Google.Apis.Storage.v1/Google.Apis.Storage.v1.cs index d2206d14dc6..1cc46804111 100644 --- a/Src/Generated/Google.Apis.Storage.v1/Google.Apis.Storage.v1.cs +++ b/Src/Generated/Google.Apis.Storage.v1/Google.Apis.Storage.v1.cs @@ -7092,6 +7092,233 @@ protected override void InitParameters() } } + /// Moves the source object to the destination object in the same bucket. + /// Name of the bucket in which the object resides. + /// + /// Name of the source object. For information about how to URL encode object names to be path safe, see + /// [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). + /// + /// + /// Name of the destination object. For information about how to URL encode object names to be path safe, see + /// [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). + /// + public virtual MoveRequest Move(string bucket, string sourceObject, string destinationObject) + { + return new MoveRequest(this.service, bucket, sourceObject, destinationObject); + } + + /// Moves the source object to the destination object in the same bucket. + public class MoveRequest : StorageBaseServiceRequest + { + /// Constructs a new Move request. + public MoveRequest(Google.Apis.Services.IClientService service, string bucket, string sourceObject, string destinationObject) : base(service) + { + Bucket = bucket; + SourceObject = sourceObject; + DestinationObject = destinationObject; + InitParameters(); + } + + /// Name of the bucket in which the object resides. + [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)] + public virtual string Bucket { get; private set; } + + /// + /// Name of the source object. For information about how to URL encode object names to be path safe, see + /// [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). + /// + [Google.Apis.Util.RequestParameterAttribute("sourceObject", Google.Apis.Util.RequestParameterType.Path)] + public virtual string SourceObject { get; private set; } + + /// + /// Name of the destination object. For information about how to URL encode object names to be path safe, + /// see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). + /// + [Google.Apis.Util.RequestParameterAttribute("destinationObject", Google.Apis.Util.RequestParameterType.Path)] + public virtual string DestinationObject { get; private set; } + + /// + /// Makes the operation conditional on whether the destination object's current generation matches the given + /// value. Setting to 0 makes the operation succeed only if there are no live versions of the object. + /// `ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both + /// of them to be set in the request. + /// + [Google.Apis.Util.RequestParameterAttribute("ifGenerationMatch", Google.Apis.Util.RequestParameterType.Query)] + public virtual System.Nullable IfGenerationMatch { get; set; } + + /// + /// Makes the operation conditional on whether the destination object's current generation does not match + /// the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation + /// succeed only if there is a live version of the object.`ifGenerationMatch` and `ifGenerationNotMatch` + /// conditions are mutually exclusive: it's an error for both of them to be set in the request. + /// + [Google.Apis.Util.RequestParameterAttribute("ifGenerationNotMatch", Google.Apis.Util.RequestParameterType.Query)] + public virtual System.Nullable IfGenerationNotMatch { get; set; } + + /// + /// Makes the operation conditional on whether the destination object's current metageneration matches the + /// given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: + /// it's an error for both of them to be set in the request. + /// + [Google.Apis.Util.RequestParameterAttribute("ifMetagenerationMatch", Google.Apis.Util.RequestParameterType.Query)] + public virtual System.Nullable IfMetagenerationMatch { get; set; } + + /// + /// Makes the operation conditional on whether the destination object's current metageneration does not + /// match the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually + /// exclusive: it's an error for both of them to be set in the request. + /// + [Google.Apis.Util.RequestParameterAttribute("ifMetagenerationNotMatch", Google.Apis.Util.RequestParameterType.Query)] + public virtual System.Nullable IfMetagenerationNotMatch { get; set; } + + /// + /// Makes the operation conditional on whether the source object's current generation matches the given + /// value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: + /// it's an error for both of them to be set in the request. + /// + [Google.Apis.Util.RequestParameterAttribute("ifSourceGenerationMatch", Google.Apis.Util.RequestParameterType.Query)] + public virtual System.Nullable IfSourceGenerationMatch { get; set; } + + /// + /// Makes the operation conditional on whether the source object's current generation does not match the + /// given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually + /// exclusive: it's an error for both of them to be set in the request. + /// + [Google.Apis.Util.RequestParameterAttribute("ifSourceGenerationNotMatch", Google.Apis.Util.RequestParameterType.Query)] + public virtual System.Nullable IfSourceGenerationNotMatch { get; set; } + + /// + /// Makes the operation conditional on whether the source object's current metageneration matches the given + /// value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually + /// exclusive: it's an error for both of them to be set in the request. + /// + [Google.Apis.Util.RequestParameterAttribute("ifSourceMetagenerationMatch", Google.Apis.Util.RequestParameterType.Query)] + public virtual System.Nullable IfSourceMetagenerationMatch { get; set; } + + /// + /// Makes the operation conditional on whether the source object's current metageneration does not match the + /// given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually + /// exclusive: it's an error for both of them to be set in the request. + /// + [Google.Apis.Util.RequestParameterAttribute("ifSourceMetagenerationNotMatch", Google.Apis.Util.RequestParameterType.Query)] + public virtual System.Nullable IfSourceMetagenerationNotMatch { get; set; } + + /// The project to be billed for this request. Required for Requester Pays buckets. + [Google.Apis.Util.RequestParameterAttribute("userProject", Google.Apis.Util.RequestParameterType.Query)] + public virtual string UserProject { get; set; } + + /// Gets the method name. + public override string MethodName => "move"; + + /// Gets the HTTP method. + public override string HttpMethod => "POST"; + + /// Gets the REST path. + public override string RestPath => "b/{bucket}/o/{sourceObject}/moveTo/o/{destinationObject}"; + + /// Initializes Move parameter list. + protected override void InitParameters() + { + base.InitParameters(); + RequestParameters.Add("bucket", new Google.Apis.Discovery.Parameter + { + Name = "bucket", + IsRequired = true, + ParameterType = "path", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("sourceObject", new Google.Apis.Discovery.Parameter + { + Name = "sourceObject", + IsRequired = true, + ParameterType = "path", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("destinationObject", new Google.Apis.Discovery.Parameter + { + Name = "destinationObject", + IsRequired = true, + ParameterType = "path", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("ifGenerationMatch", new Google.Apis.Discovery.Parameter + { + Name = "ifGenerationMatch", + IsRequired = false, + ParameterType = "query", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("ifGenerationNotMatch", new Google.Apis.Discovery.Parameter + { + Name = "ifGenerationNotMatch", + IsRequired = false, + ParameterType = "query", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("ifMetagenerationMatch", new Google.Apis.Discovery.Parameter + { + Name = "ifMetagenerationMatch", + IsRequired = false, + ParameterType = "query", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("ifMetagenerationNotMatch", new Google.Apis.Discovery.Parameter + { + Name = "ifMetagenerationNotMatch", + IsRequired = false, + ParameterType = "query", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("ifSourceGenerationMatch", new Google.Apis.Discovery.Parameter + { + Name = "ifSourceGenerationMatch", + IsRequired = false, + ParameterType = "query", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("ifSourceGenerationNotMatch", new Google.Apis.Discovery.Parameter + { + Name = "ifSourceGenerationNotMatch", + IsRequired = false, + ParameterType = "query", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("ifSourceMetagenerationMatch", new Google.Apis.Discovery.Parameter + { + Name = "ifSourceMetagenerationMatch", + IsRequired = false, + ParameterType = "query", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("ifSourceMetagenerationNotMatch", new Google.Apis.Discovery.Parameter + { + Name = "ifSourceMetagenerationNotMatch", + IsRequired = false, + ParameterType = "query", + DefaultValue = null, + Pattern = null, + }); + RequestParameters.Add("userProject", new Google.Apis.Discovery.Parameter + { + Name = "userProject", + IsRequired = false, + ParameterType = "query", + DefaultValue = null, + Pattern = null, + }); + } + } + /// Patches an object's metadata. /// The body of the request. /// Name of the bucket in which the object resides. diff --git a/Src/Generated/Google.Apis.Storage.v1/Google.Apis.Storage.v1.csproj b/Src/Generated/Google.Apis.Storage.v1/Google.Apis.Storage.v1.csproj index ba430f07141..fc2b7d067ca 100644 --- a/Src/Generated/Google.Apis.Storage.v1/Google.Apis.Storage.v1.csproj +++ b/Src/Generated/Google.Apis.Storage.v1/Google.Apis.Storage.v1.csproj @@ -3,7 +3,7 @@ Google.Apis.Storage.v1 Client Library - 1.68.0.3604 + 1.68.0.3627 Google LLC Copyright 2024 Google LLC Google