Example #1
0
 /// <summary>Snippet for GetSchema</summary>
 public void GetSchemaResourceNames()
 {
     // Snippet: GetSchema(SchemaName, CallSettings)
     // Create client
     SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
     // Initialize request argument(s)
     SchemaName name = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]");
     // Make the request
     Schema response = schemaServiceClient.GetSchema(name);
     // End snippet
 }
Example #2
0
 /// <summary>Snippet for GetSchema</summary>
 public void GetSchema()
 {
     // Snippet: GetSchema(string, CallSettings)
     // Create client
     SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
     // Initialize request argument(s)
     string name = "projects/[PROJECT]/schemas/[SCHEMA]";
     // Make the request
     Schema response = schemaServiceClient.GetSchema(name);
     // End snippet
 }
    public Schema GetSchema(string projectId, string schemaId)
    {
        SchemaServiceClient schemaService = SchemaServiceClient.Create();
        SchemaName          schemaName    = SchemaName.FromProjectSchema(projectId, schemaId);
        GetSchemaRequest    request       = new GetSchemaRequest
        {
            Name = schemaName.ToString(),
            View = SchemaView.Full
        };

        return(schemaService.GetSchema(request));
    }
Example #4
0
 /// <summary>Snippet for GetSchema</summary>
 public void GetSchemaRequestObject()
 {
     // Snippet: GetSchema(GetSchemaRequest, CallSettings)
     // Create client
     SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
     // Initialize request argument(s)
     GetSchemaRequest request = new GetSchemaRequest
     {
         SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
         View       = SchemaView.Unspecified,
     };
     // Make the request
     Schema response = schemaServiceClient.GetSchema(request);
     // End snippet
 }