Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Sep 16, 2020
1 parent d8bd07c commit c990156
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public enum MessageAction: Codable, MessageActionConvertible {
}

public struct MessageURIAction: Codable, TemplateMessageActionTypeCompatible, MessageActionConvertible {
let type = MessageActionType.URI
private(set) var type = MessageActionType.URI
public let label: String?
public let uri: URL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/// A box component behave as a container of other components. It defines the layout of its child components.
/// You can also include a nested box in a box.
public struct FlexBoxComponent: Codable, FlexMessageComponentTypeCompatible, MessageActionContainer {
let type: FlexMessageComponentType = .box
private(set) var type: FlexMessageComponentType = .box

/// The placement style of components in this box.
public let layout: FlexMessageComponent.Layout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public struct FlexButtonComponent: Codable, FlexMessageComponentTypeCompatible {
public static let defaultCase: FlexButtonComponent.Style = .link
}

let type = FlexMessageComponentType.button
private(set) var type = FlexMessageComponentType.button

/// An action to perform when the button tapped.
/// Use `setAction` method if you want to set a `MessageActionConvertible` as the action of current component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/// Represents an invisible component to fill extra space between components.
/// The filler's `flex` is fixed to 1. The `spacing` property of the parent box will be ignored for fillers.
public struct FlexFillerComponent: Codable, FlexMessageComponentTypeCompatible {
let type: FlexMessageComponentType = .filler
private(set) var type: FlexMessageComponentType = .filler

/// Creates a filler component.
public init() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Foundation
/// LINE internal use only.
/// Represents an icon component. It is used to embed into a baseline layout and its flex is fixed to 0.
public struct FlexIconComponent: Codable, FlexMessageComponentTypeCompatible {
let type: FlexMessageComponentType = .icon
private(set) var type: FlexMessageComponentType = .icon

/// Icon URL. It should start with "https".
public let url: URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/// Different from the `separator` property of `FlexBlockStyle`, the `FlexSeparatorComponent` allows you to add a
/// separator between components instead of container block, as well as full control on separator `margin`.
public struct FlexSeparatorComponent: Codable, FlexMessageComponentTypeCompatible {
let type: FlexMessageComponentType = .separator
private(set) var type: FlexMessageComponentType = .separator

/// Minimum space between this component and the previous component in the parent box.
/// If not specified, the `spacing` of parent box will be used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/// Represents some spacing in a box component.
/// This is an invisible component that places a fixed-size space at the beginning or end of the box.
public struct FlexSpacerComponent: Codable, FlexMessageComponentTypeCompatible {
let type: FlexMessageComponentType = .spacer
private(set) var type: FlexMessageComponentType = .spacer

/// Size of the space.
/// You can specify one from: `[.xs, .sm, .md, .lg, .xl, .xxl]`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public struct FlexBubbleContainer: Codable, FlexMessageContainerTypeCompatible {
public static let defaultCase: Direction = .leftToRight
}

let type = FlexMessageContainerType.bubble
private(set) var type = FlexMessageContainerType.bubble

/// The header block. Header section of the bubble. This block is a `FlexBoxComponent` and could contains
/// arbitrary nested components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/// scrolling horizontally.
///
public struct FlexCarouselContainer: Codable, FlexMessageContainerTypeCompatible {
let type = FlexMessageContainerType.carousel
private(set) var type = FlexMessageContainerType.carousel

/// Array of `FlexBubbleContainer`s. You could set at most 10 bubble container in this carousel container.
/// Line SDK does not check the elements count in a container. However, it would cause an API response error
Expand Down
2 changes: 1 addition & 1 deletion LineSDK/LineSDK/Messaging/Model/FlexMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
///
/// For more information, see https://developers.line.biz/en/docs/messaging-api/message-types/#flex-messages .
public struct FlexMessage: Codable, MessageTypeCompatible {
let type = MessageType.flex
private(set) var type = MessageType.flex

/// An alternate text to show in LINE push notification or chat preview.
public var altText: String
Expand Down
2 changes: 1 addition & 1 deletion LineSDK/LineSDK/Messaging/Model/LocationMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public struct LocationMessage: Codable, MessageTypeCompatible {
/// Represents a location latitude or longitude degrees.
public typealias LocationDegrees = Double

let type = MessageType.location
private(set) var type = MessageType.location

/// Title name of the location.
public var title: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/// Represents a template payload with a text and two action button.
/// Use this template if you want users to answer between "Yes" or "No".
public struct TemplateConfirmPayload: Codable, TemplateMessagePayloadTypeCompatible {
let type = TemplateMessagePayloadType.confirm
private(set) var type = TemplateMessagePayloadType.confirm

/// Message text in the chat bubble.
public var text: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public struct TemplateImageCarouselPayload: Codable, TemplateMessagePayloadTypeC
}
}

let type = TemplateMessagePayloadType.imageCarousel
private(set) var type = TemplateMessagePayloadType.imageCarousel

/// Array of columns. You could set at most 10 columns in the payload. Line SDK does not check the elements count
/// in a payload. However, it would cause an API response error if more columns contained in the payload.
Expand Down

0 comments on commit c990156

Please sign in to comment.