Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codes are generated by openapi generator #502

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions linebot/messaging_api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ api_messaging_api_blob.go
model_action.go
model_age_demographic.go
model_age_demographic_filter.go
model_all_mention_target.go
model_alt_uri.go
model_app_type_demographic.go
model_app_type_demographic_filter.go
Expand All @@ -26,6 +27,7 @@ model_create_rich_menu_alias_request.go
model_datetime_picker_action.go
model_demographic_filter.go
model_emoji.go
model_emoji_substitution_object.go
model_error_detail.go
model_error_response.go
model_filter.go
Expand Down Expand Up @@ -85,6 +87,8 @@ model_mark_messages_as_read_request.go
model_members_ids_response.go
model_membership.go
model_membership_list_response.go
model_mention_substitution_object.go
model_mention_target.go
model_message.go
model_message_action.go
model_message_imagemap_action.go
Expand Down Expand Up @@ -138,16 +142,19 @@ model_subscribed_membership_user.go
model_subscription.go
model_subscription_period_demographic.go
model_subscription_period_demographic_filter.go
model_substitution_object.go
model_template.go
model_template_image_aspect_ratio.go
model_template_image_size.go
model_template_message.go
model_test_webhook_endpoint_request.go
model_test_webhook_endpoint_response.go
model_text_message.go
model_text_message_v2.go
model_update_rich_menu_alias_request.go
model_uri_action.go
model_uri_imagemap_action.go
model_user_mention_target.go
model_user_profile_response.go
model_validate_message_request.go
model_video_message.go
4 changes: 2 additions & 2 deletions linebot/messaging_api/api_messaging_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -3453,7 +3453,7 @@ func (client *MessagingApiAPI) ReplyMessageWithHttpInfo(

// RichMenuBatch
//
// You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu
// You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu
// Parameters:
// richMenuBatchRequest

Expand All @@ -3473,7 +3473,7 @@ func (client *MessagingApiAPI) RichMenuBatch(
// RichMenuBatch
// If you want to take advantage of the HTTPResponse object for status codes and headers, use this signature.
//
// You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu
// You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu
// Parameters:
// richMenuBatchRequest

Expand Down
46 changes: 46 additions & 0 deletions linebot/messaging_api/model_all_mention_target.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

//go:generate python3 ../../generate-code.py
package messaging_api

import (
"encoding/json"
)

// AllMentionTarget
// AllMentionTarget
// https://developers.line.biz/en/reference/messaging-api/#text-message-v2-mentionee-all
type AllMentionTarget struct {
MentionTarget
}

// MarshalJSON customizes the JSON serialization of the AllMentionTarget struct.
func (r *AllMentionTarget) MarshalJSON() ([]byte, error) {

type Alias AllMentionTarget
return json.Marshal(&struct {
*Alias

Type string `json:"type"`
}{
Alias: (*Alias)(r),

Type: "all",
})
}
56 changes: 56 additions & 0 deletions linebot/messaging_api/model_emoji_substitution_object.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

//go:generate python3 ../../generate-code.py
package messaging_api

import (
"encoding/json"
)

// EmojiSubstitutionObject
// An object representing a emoji substitution.
// https://developers.line.biz/en/reference/messaging-api/#text-message-v2-emoji-object
type EmojiSubstitutionObject struct {
SubstitutionObject

/**
* Get ProductId
*/
ProductId string `json:"productId"`

/**
* Get EmojiId
*/
EmojiId string `json:"emojiId"`
}

// MarshalJSON customizes the JSON serialization of the EmojiSubstitutionObject struct.
func (r *EmojiSubstitutionObject) MarshalJSON() ([]byte, error) {

type Alias EmojiSubstitutionObject
return json.Marshal(&struct {
*Alias

Type string `json:"type"`
}{
Alias: (*Alias)(r),

Type: "emoji",
})
}
2 changes: 1 addition & 1 deletion linebot/messaging_api/model_flex_box_spacing.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package messaging_api

/*
* You can specify the minimum space between two components with the `spacing` property of the parent box component, in pixels or with a keyword. FlexBoxSpacing just provides only keywords.
* You can specify the minimum space between two components with the `spacing` property of the parent box component, in pixels or with a keyword. FlexBoxSpacing just provides only keywords.
*/

// FlexBoxSpacing type
Expand Down
2 changes: 1 addition & 1 deletion linebot/messaging_api/model_flex_margin.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package messaging_api

/*
* You can specify the minimum space before a child component with the `margin` property of the child component, in pixels or with a keyword. FlexMargin just provides only keywords.
* You can specify the minimum space before a child component with the `margin` property of the child component, in pixels or with a keyword. FlexMargin just provides only keywords.
*/

// FlexMargin type
Expand Down
2 changes: 1 addition & 1 deletion linebot/messaging_api/model_flex_span_size.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package messaging_api

/*
* Font size in the `size` property of the Flex span component. You can specify the size in pixels or with a keyword. FlexSpanSize just provides only keywords.
* Font size in the `size` property of the Flex span component. You can specify the size in pixels or with a keyword. FlexSpanSize just provides only keywords.
*/

// FlexSpanSize type
Expand Down
2 changes: 1 addition & 1 deletion linebot/messaging_api/model_flex_text_font_size.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package messaging_api

/*
* Font size in the `size` property of the Flex text component. You can specify the size in pixels or with a keyword. FlexTextFontSize just provides only keywords.
* Font size in the `size` property of the Flex text component. You can specify the size in pixels or with a keyword. FlexTextFontSize just provides only keywords.
*/

// FlexTextFontSize type
Expand Down
85 changes: 85 additions & 0 deletions linebot/messaging_api/model_mention_substitution_object.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

//go:generate python3 ../../generate-code.py
package messaging_api

import (
"encoding/json"
"fmt"
)

// MentionSubstitutionObject
// An object representing a mention substitution.
// https://developers.line.biz/en/reference/messaging-api/#text-message-v2-mention-object
type MentionSubstitutionObject struct {
SubstitutionObject

/**
* Get Mentionee
*/
Mentionee MentionTargetInterface `json:"mentionee"`
}

func (cr *MentionSubstitutionObject) UnmarshalJSON(data []byte) error {
var raw map[string]json.RawMessage
err := json.Unmarshal(data, &raw)
if err != nil {
return fmt.Errorf("JSON parse error in map: %w", err)
}

if raw["type"] != nil {

err = json.Unmarshal(raw["type"], &cr.Type)
if err != nil {
return fmt.Errorf("JSON parse error in string(Type): %w", err)
}

}

if raw["mentionee"] != nil {

if rawmentionee, ok := raw["mentionee"]; ok && rawmentionee != nil {
Mentionee, err := UnmarshalMentionTarget(rawmentionee)
if err != nil {
return fmt.Errorf("JSON parse error in MentionTarget(discriminator): %w", err)
}
cr.Mentionee = Mentionee
}

}

return nil
}

// MarshalJSON customizes the JSON serialization of the MentionSubstitutionObject struct.
func (r *MentionSubstitutionObject) MarshalJSON() ([]byte, error) {

r.Mentionee = setDiscriminatorPropertyMentionTarget(r.Mentionee)

type Alias MentionSubstitutionObject
return json.Marshal(&struct {
*Alias

Type string `json:"type"`
}{
Alias: (*Alias)(r),

Type: "mention",
})
}
Loading