Skip to content

Commit

Permalink
feat: New generated content (#401)
Browse files Browse the repository at this point in the history
Use non-keyset pagination for object-storage in rust

in rust sdk templates implement required method for a non-keyset based
pagination for object-storage service.

Change-Id: I11fc4a5967ee526bd45b361ecd6f405bb23ce9a1

Changes are triggered by https://review.opendev.org/925479
  • Loading branch information
gtema authored Aug 1, 2024
1 parent e802aa3 commit 2908d7f
Showing 18 changed files with 76 additions and 3 deletions.
3 changes: 3 additions & 0 deletions openstack_sdk/src/api/object_store/v1.rs
Original file line number Diff line number Diff line change
@@ -11,6 +11,9 @@
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
//
// WARNING: This file is automatically generated from OpenAPI schema using
// `openstack-codegenerator`.

//! `Object_store` Service bindings
pub mod account;
2 changes: 1 addition & 1 deletion openstack_sdk/src/api/object_store/v1/account.rs
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// WARNING: This file is automatically generated from OpenAPI schema using
// `openstack-codegenerator`.

//! `/{account}` REST operations of object_store
//! `/v1/{account}` REST operations of object_store
pub mod delete;
pub mod get;
pub mod head;
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/account/delete.rs
Original file line number Diff line number Diff line change
@@ -103,6 +103,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/account/get.rs
Original file line number Diff line number Diff line change
@@ -153,6 +153,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}
impl<'a> Pageable for Request<'a> {
fn use_keyset_pagination(&self) -> bool {
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/account/head.rs
Original file line number Diff line number Diff line change
@@ -97,6 +97,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/account/set.rs
Original file line number Diff line number Diff line change
@@ -104,6 +104,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
2 changes: 1 addition & 1 deletion openstack_sdk/src/api/object_store/v1/container.rs
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// WARNING: This file is automatically generated from OpenAPI schema using
// `openstack-codegenerator`.

//! `/{account}/{container}` REST operations of object_store
//! `/v1/{account}/{container}` REST operations of object_store
pub mod create;
pub mod delete;
pub mod get;
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/container/create.rs
Original file line number Diff line number Diff line change
@@ -111,6 +111,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/container/delete.rs
Original file line number Diff line number Diff line change
@@ -110,6 +110,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/container/get.rs
Original file line number Diff line number Diff line change
@@ -173,6 +173,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}
impl<'a> Pageable for Request<'a> {
fn use_keyset_pagination(&self) -> bool {
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/container/head.rs
Original file line number Diff line number Diff line change
@@ -110,6 +110,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/container/set.rs
Original file line number Diff line number Diff line change
@@ -109,6 +109,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
2 changes: 1 addition & 1 deletion openstack_sdk/src/api/object_store/v1/object.rs
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// WARNING: This file is automatically generated from OpenAPI schema using
// `openstack-codegenerator`.

//! `/{account}/{container}/{object}` REST operations of object_store
//! `/v1/{account}/{container}/{object}` REST operations of object_store
pub mod delete;
pub mod get;
pub mod head;
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/object/delete.rs
Original file line number Diff line number Diff line change
@@ -135,6 +135,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/object/get.rs
Original file line number Diff line number Diff line change
@@ -168,6 +168,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/object/head.rs
Original file line number Diff line number Diff line change
@@ -166,6 +166,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/object/put.rs
Original file line number Diff line number Diff line change
@@ -178,6 +178,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]
5 changes: 5 additions & 0 deletions openstack_sdk/src/api/object_store/v1/object/set.rs
Original file line number Diff line number Diff line change
@@ -182,6 +182,11 @@ impl<'a> RestEndpoint for Request<'a> {
fn request_headers(&self) -> Option<&HeaderMap> {
self._headers.as_ref()
}

/// Returns required API version
fn api_version(&self) -> Option<ApiVersion> {
Some(ApiVersion::new(1, 0))
}
}

#[cfg(test)]

0 comments on commit 2908d7f

Please sign in to comment.