Module org.elasticsearch.xcore
Record Class RegionPolicy
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.core.inference.regionpolicy.RegionPolicy
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParseFieldstatic final ParseFieldstatic final ConstructingObjectParser<RegionPolicy, Void> static final ConstructingObjectParser<RegionPolicy, Void> Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionRegionPolicy(List<String> allowedGeos, List<CspRegion> allowedRegions) Creates an instance of aRegionPolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedGeosrecord component.Returns the value of theallowedRegionsrecord component.static ConstructingObjectParser<RegionPolicy, Void> createParser(boolean ignoreUnknownFields) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
ALLOWED_GEOS_FIELD
-
ALLOWED_REGIONS_FIELD
-
LENIENT_PARSER
-
STRICT_PARSER
-
-
Constructor Details
-
RegionPolicy
- Throws:
IOException
-
RegionPolicy
Creates an instance of aRegionPolicyrecord class.- Parameters:
allowedGeos- the value for theallowedGeosrecord componentallowedRegions- the value for theallowedRegionsrecord component
-
-
Method Details
-
createParser
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
allowedGeos
Returns the value of theallowedGeosrecord component.- Returns:
- the value of the
allowedGeosrecord component
-
allowedRegions
Returns the value of theallowedRegionsrecord component.- Returns:
- the value of the
allowedRegionsrecord component
-