Freigeben über


InsightAttachments.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync Methode

Definition

Gibt eine paginierte Liste von Erkenntnisressourcen zurück.

public virtual Azure.AsyncPageable<BinaryData> GetInsightAttachmentsByPartyIdModelIdAndResourceAsync (string partyId, string modelId, string resourceType, string resourceId, System.Collections.Generic.IEnumerable<string> insightIds = default, System.Collections.Generic.IEnumerable<string> ids = default, System.Collections.Generic.IEnumerable<string> names = default, System.Collections.Generic.IEnumerable<string> propertyFilters = default, System.Collections.Generic.IEnumerable<string> statuses = default, DateTimeOffset? minCreatedDateTime = default, DateTimeOffset? maxCreatedDateTime = default, DateTimeOffset? minLastModifiedDateTime = default, DateTimeOffset? maxLastModifiedDateTime = default, int? maxPageSize = default, string skipToken = default, Azure.RequestContext context = default);
abstract member GetInsightAttachmentsByPartyIdModelIdAndResourceAsync : string * string * string * string * seq<string> * seq<string> * seq<string> * seq<string> * seq<string> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<int> * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync : string * string * string * string * seq<string> * seq<string> * seq<string> * seq<string> * seq<string> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<int> * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetInsightAttachmentsByPartyIdModelIdAndResourceAsync (partyId As String, modelId As String, resourceType As String, resourceId As String, Optional insightIds As IEnumerable(Of String) = Nothing, Optional ids As IEnumerable(Of String) = Nothing, Optional names As IEnumerable(Of String) = Nothing, Optional propertyFilters As IEnumerable(Of String) = Nothing, Optional statuses As IEnumerable(Of String) = Nothing, Optional minCreatedDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional maxCreatedDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional minLastModifiedDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional maxLastModifiedDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional maxPageSize As Nullable(Of Integer) = Nothing, Optional skipToken As String = Nothing, Optional context As RequestContext = Nothing) As AsyncPageable(Of BinaryData)

Parameter

partyId
String

ID der zugeordneten Partei.

modelId
String

ID des zugeordneten Modells.

resourceType
String

Ressourcentyp, der dem Datensatz zugeordnet ist.

resourceId
String

ID der zugeordneten Ressource.

insightIds
IEnumerable<String>

Liste der Erkenntnis-IDs.

ids
IEnumerable<String>

Ids der Ressource.

names
IEnumerable<String>

Namen der Ressource.

propertyFilters
IEnumerable<String>

Filtert nach Schlüssel-Wert-Paaren innerhalb des Properties-Objekts. Beispiel: "{testKey} eq {testValue}".

statuses
IEnumerable<String>

Status der Ressource.

minCreatedDateTime
Nullable<DateTimeOffset>

Minimales Erstellungsdatum der Ressource (inklusive).

maxCreatedDateTime
Nullable<DateTimeOffset>

Maximales Erstellungsdatum der Ressource (inklusive).

minLastModifiedDateTime
Nullable<DateTimeOffset>

Mindestdatum der letzten Änderung der Ressource (einschließlich).

maxLastModifiedDateTime
Nullable<DateTimeOffset>

Maximales Datum der letzten Änderung der Ressource (einschließlich).

maxPageSize
Nullable<Int32>

Maximale Anzahl erforderlicher Elemente (inklusive). Minimum = 10, Maximum = 1000, Standardwert = 50.

skipToken
String

Überspringen Sie das Token, um den nächsten Satz von Ergebnissen zu erhalten.

context
RequestContext

Der Anforderungskontext, der das Standardverhalten der Clientpipeline pro Aufruf außer Kraft setzen kann.

Gibt zurück

Die AsyncPageable<T> aus dem Dienst, die eine Liste von BinaryData -Objekten enthält. Details zum Textschema für jedes Element in der Auflistung finden Sie unten im Abschnitt Hinweise.

Ausnahmen

partyId, modelId, resourceType oder resourceId ist NULL.

partyId, modelIdoder resourceTyperesourceId ist eine leere Zeichenfolge, und es wurde erwartet, dass sie nicht leer ist.

Der Dienst hat einen nicht erfolgreichen status Code zurückgegeben.

Beispiele

In diesem Beispiel wird gezeigt, wie GetInsightAttachmentsByPartyIdModelIdAndResourceAsync mit den erforderlichen Parametern aufgerufen und das Ergebnis analysiert wird.

var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(<2022-11-01-preview>);

await foreach (var data in client.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync("<partyId>", "<modelId>", "<resourceType>", "<resourceId>"))
{
    JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("insightId").ToString());
}

In diesem Beispiel wird gezeigt, wie GetInsightAttachmentsByPartyIdModelIdAndResourceAsync mit allen Parametern aufgerufen und das Ergebnis analysiert wird.

var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetInsightAttachmentsClient(<2022-11-01-preview>);

await foreach (var data in client.GetInsightAttachmentsByPartyIdModelIdAndResourceAsync("<partyId>", "<modelId>", "<resourceType>", "<resourceId>", new String[]{"<insightIds>"}, new String[]{"<ids>"}, new String[]{"<names>"}, new String[]{"<propertyFilters>"}, new String[]{"<statuses>"}, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "<skipToken>"))
{
    JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("insightId").ToString());
    Console.WriteLine(result.GetProperty("modelId").ToString());
    Console.WriteLine(result.GetProperty("resourceType").ToString());
    Console.WriteLine(result.GetProperty("resourceId").ToString());
    Console.WriteLine(result.GetProperty("originalFileName").ToString());
    Console.WriteLine(result.GetProperty("partyId").ToString());
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("status").ToString());
    Console.WriteLine(result.GetProperty("createdDateTime").ToString());
    Console.WriteLine(result.GetProperty("modifiedDateTime").ToString());
    Console.WriteLine(result.GetProperty("source").ToString());
    Console.WriteLine(result.GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("description").ToString());
    Console.WriteLine(result.GetProperty("createdBy").ToString());
    Console.WriteLine(result.GetProperty("modifiedBy").ToString());
    Console.WriteLine(result.GetProperty("eTag").ToString());
}

Hinweise

Unten sehen Sie das JSON-Schema für ein Element in der auslagerungsfähigen Antwort.

Antworttext:

Schema für InsightAttachmentListResponseValue:

{
  insightId: string, # Required. InsightID for this InsightAttachment.
  modelId: string, # Optional. ModelID for this InsightAttachment.
  resourceType: "Party" | "Farm" | "Field" | "SeasonalField" | "Boundary", # Optional. Associated Resource type for this attachment.
  resourceId: string, # Optional. Associated Resource id for this attachment.
  originalFileName: string, # Optional. Original File Name for this attachment.
  partyId: string, # Optional. PartyId id for this attachment.
  id: string, # Optional. Unique id.
  status: string, # Optional. Status of the resource.
  createdDateTime: string (ISO 8601 Format), # Optional. Date when resource was created.
  modifiedDateTime: string (ISO 8601 Format), # Optional. Date when resource was last modified.
  source: string, # Optional. Source of the resource.
  name: string, # Optional. Name to identify resource.
  description: string, # Optional. Textual description of resource.
  createdBy: string, # Optional. Created by user/tenant id.
  modifiedBy: string, # Optional. Modified by user/tenant id.
  eTag: string, # Optional. The ETag value to implement optimistic concurrency.
}

Gilt für: