pub struct CreateCatalogImageRequest {
pub idempotency_key: String,
pub object_id: Option<String>,
pub image: CatalogObject,
pub is_primary: Option<bool>,
}
Expand description
This is a model class for CreateCatalogImageRequest type.
Fields§
§idempotency_key: String
A unique string that identifies this CreateCatalogImage request. Keys can be any valid string but must be unique for every CreateCatalogImage request.
See Idempotency keys for more information.
object_id: Option<String>
Unique ID of the CatalogObject
to attach this CatalogImage
object to. Leave this field
empty to create unattached images, for example if you are building an integration where an
image can be attached to catalog items at a later time.
image: CatalogObject
The new CatalogObject
of the IMAGE
type, namely, a CatalogImage
object, to encapsulate
the specified image file.
is_primary: Option<bool>
If this is set to true
, the image created will be the primary, or first image of the
object referenced by object_id
. If the CatalogObject
already has a primary
CatalogImage
, setting this field to true
will replace the primary image. If this is set
to false
and you use the Square API version 2021-12-15 or later, the image id will be
appended to the list of image_ids
on the object.
With Square API version 2021-12-15 or later, the default value is false
. Otherwise, the
effective default value is true
.
Trait Implementations§
Source§impl Clone for CreateCatalogImageRequest
impl Clone for CreateCatalogImageRequest
Source§fn clone(&self) -> CreateCatalogImageRequest
fn clone(&self) -> CreateCatalogImageRequest
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CreateCatalogImageRequest
impl Debug for CreateCatalogImageRequest
Source§impl Default for CreateCatalogImageRequest
impl Default for CreateCatalogImageRequest
Source§fn default() -> CreateCatalogImageRequest
fn default() -> CreateCatalogImageRequest
impl Eq for CreateCatalogImageRequest
impl StructuralPartialEq for CreateCatalogImageRequest
Auto Trait Implementations§
impl Freeze for CreateCatalogImageRequest
impl RefUnwindSafe for CreateCatalogImageRequest
impl Send for CreateCatalogImageRequest
impl Sync for CreateCatalogImageRequest
impl Unpin for CreateCatalogImageRequest
impl UnwindSafe for CreateCatalogImageRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.