Class ImmutableYangNetconfError.Builder
java.lang.Object
org.opendaylight.yangtools.yang.data.api.ImmutableYangNetconfError.Builder
- All Implemented Interfaces:
ImmutableYangNetconfError.BuildFinal
,ImmutableYangNetconfError.SeverityBuildStage
,ImmutableYangNetconfError.TagBuildStage
,ImmutableYangNetconfError.TypeBuildStage
- Enclosing class:
- ImmutableYangNetconfError
public static final class ImmutableYangNetconfError.Builder
extends Object
implements ImmutableYangNetconfError.SeverityBuildStage, ImmutableYangNetconfError.TypeBuildStage, ImmutableYangNetconfError.TagBuildStage, ImmutableYangNetconfError.BuildFinal
Builds instances of type
ImmutableYangNetconfError
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllInfo
(Iterable<? extends YangErrorInfo> elements) Adds elements toinfo
list.addInfo
(YangErrorInfo element) Adds one element toinfo
list.addInfo
(YangErrorInfo... elements) Adds elements toinfo
list.Initializes the value for theappTag
attribute.build()
Builds a newImmutableYangNetconfError
.Initializes the value for themessage
attribute.path
(@Nullable YangInstanceIdentifier path) Initializes the value for thepath
attribute.severity
(ErrorSeverity severity) Initializes the value for theseverity
attribute.Initializes the value for thetag
attribute.Initializes the value for thetype
attribute.
-
Method Details
-
severity
Initializes the value for theseverity
attribute.- Specified by:
severity
in interfaceImmutableYangNetconfError.SeverityBuildStage
- Parameters:
severity
- The value for severity- Returns:
this
builder for use in a chained invocation
-
type
Initializes the value for thetype
attribute.- Specified by:
type
in interfaceImmutableYangNetconfError.TypeBuildStage
- Parameters:
type
- The value for type- Returns:
this
builder for use in a chained invocation
-
tag
Initializes the value for thetag
attribute.- Specified by:
tag
in interfaceImmutableYangNetconfError.TagBuildStage
- Parameters:
tag
- The value for tag- Returns:
this
builder for use in a chained invocation
-
message
Initializes the value for themessage
attribute.- Specified by:
message
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
message
- The value for message (can benull
)- Returns:
this
builder for use in a chained invocation
-
appTag
Initializes the value for theappTag
attribute.- Specified by:
appTag
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
appTag
- The value for appTag (can benull
)- Returns:
this
builder for use in a chained invocation
-
path
Initializes the value for thepath
attribute.- Specified by:
path
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
path
- The value for path (can benull
)- Returns:
this
builder for use in a chained invocation
-
addInfo
Adds one element toinfo
list.- Specified by:
addInfo
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
element
- A info element- Returns:
this
builder for use in a chained invocation
-
addInfo
Adds elements toinfo
list.- Specified by:
addInfo
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
elements
- An array of info elements- Returns:
this
builder for use in a chained invocation
-
addAllInfo
public final ImmutableYangNetconfError.Builder addAllInfo(Iterable<? extends YangErrorInfo> elements) Adds elements toinfo
list.- Specified by:
addAllInfo
in interfaceImmutableYangNetconfError.BuildFinal
- Parameters:
elements
- An iterable of info elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableYangNetconfError
.- Specified by:
build
in interfaceImmutableYangNetconfError.BuildFinal
- Returns:
- An immutable instance of YangNetconfError
- Throws:
IllegalStateException
- if any required attributes are missing
-