java/src/main/java/com/aliyun/eventbridge/EventBridgeClient.java
@Override
    public PutEventsResponse putEventsWithOptions(java.util.List<CloudEvent> eventList, RuntimeOptions runtime) {
        for (CloudEvent cloudEvent : eventList) {
            if (com.aliyun.teautil.Common.isUnset(cloudEvent.specversion)) {
                cloudEvent.specversion = "1.0";
            }

            if (com.aliyun.teautil.Common.isUnset(cloudEvent.datacontenttype)) {
                cloudEvent.datacontenttype = "application/json; charset=utf-8";
            }

            com.aliyun.teautil.Common.validateModel(cloudEvent);
        }
        Object body = com.aliyun.eventbridge.base.EventBridgeUtil.serialize(eventList);
        return TeaModel.toModel(this.doRequest("putEvents", "HTTP", "POST", "/openapi/putEvents", null, body, runtime), new PutEventsResponse());
    }
/**
     * Publish event to the aliyun EventBus
     */
Publish event to the aliyun EventBus
Publish event to the aliyun EventBus
@Override
    public PutEventsResponse putEventsWithOptions(java.util.List<CloudEvent> eventList, RuntimeOptions runtime) {
        for (CloudEvent cloudEvent : eventList) {
            if (com.aliyun.teautil.Common.isUnset(cloudEvent.specversion)) {
                cloudEvent.specversion = "1.0";
            }
            if (com.aliyun.teautil.Common.isUnset(cloudEvent.datacontenttype)) {
                cloudEvent.datacontenttype = "application/json; charset=utf-8";
            }
            com.aliyun.teautil.Common.validateModel(cloudEvent);
        }
        Object body = com.aliyun.eventbridge.base.EventBridgeUtil.serialize(eventList);
        return TeaModel.toModel(this.doRequest("putEvents", "HTTP", "POST", "/openapi/putEvents", null, body, runtime), new PutEventsResponse());
    }
@ Override public PutEventsResponse putEventsWithOptions ( java . util . List < CloudEvent > eventList , RuntimeOptions runtime ) { for ( CloudEvent cloudEvent : eventList ) { if ( com . aliyun . teautil . Common . isUnset ( cloudEvent . specversion ) ) { cloudEvent . specversion = "1.0" ; } if ( com . aliyun . teautil . Common . isUnset ( cloudEvent . datacontenttype ) ) { cloudEvent . datacontenttype = "application/json; charset=utf-8" ; } com . aliyun . teautil . Common . validateModel ( cloudEvent ) ; } Object body = com . aliyun . eventbridge . base . EventBridgeUtil . serialize ( eventList ) ; return TeaModel . toModel ( this . doRequest ( "putEvents" , "HTTP" , "POST" , "/openapi/putEvents" , null , body , runtime ) , new PutEventsResponse ( ) ) ; }
Publish event to the aliyun EventBus
Publish event to the aliyun EventBus