io.sphere.sdk.products.commands.updateactions.SetMetaDescription Maven / Gradle / Ivy
package io.sphere.sdk.products.commands.updateactions;
import io.sphere.sdk.commands.UpdateActionImpl;
import io.sphere.sdk.models.LocalizedString;
import io.sphere.sdk.products.Product;
import javax.annotation.Nullable;
/**
* Sets the SEO attribute description.
*
* {@doc.gen intro}
*
* {@include.example io.sphere.sdk.products.commands.ProductUpdateCommandTest#setMetaDescription()}
* Create update actions to set the SEO attributes title, description and keywords altogether:
* {@include.example io.sphere.sdk.products.commands.ProductUpdateCommandTest#setMetaAttributes()}
*/
public class SetMetaDescription extends UpdateActionImpl {
@Nullable
private final LocalizedString metaDescription;
private SetMetaDescription(final LocalizedString metaDescription) {
super("setMetaDescription");
this.metaDescription = metaDescription;
}
public static SetMetaDescription of(@Nullable final LocalizedString metaDescription) {
return new SetMetaDescription(metaDescription);
}
@Nullable
public LocalizedString getMetaDescription() {
return metaDescription;
}
}